Smallest size for subform?

C

CW

My frmMain has tblInquiries as its record source.
I also have frmEvents, based on tblEvents, which records the progress of
inquiries and orders.
One important field, BookedDate, is in tblEvents and is usually updated on
frmEvents.
However, the users would prefer it to be displayed and editable on frmMain.
I have created a subform on there containing this one field and this works
in principle, but the subform covers up several adjoining controls. I have
shrunk it to what appears to be the smallest possible size when looked at in
View mode, but it is actually rather larger than it appears (as can be seen
in Design mode).
How can I crop it to the smallest possible size (just the size of the
control itself)?
Or is there a better way of achieving what I need to do (make a field from
another table editable on my Main form?
Many thanks
CW
 
S

Sylvain Lafontaine

Instead of a subform, you could have an unbound control and put code that
will update the foreign table upon change of the value of the control or
retrieve its value when navigating the main recordset.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
Independent consultant and remote programming for Access and SQL-Server
(French)
 
C

CW

Ah - that sounds like a smart way to do it. Could you kindly give me the code
please (and what event this would be attached to)
Many thanks
CW
 
S

Sylvain Lafontaine

Well, you should use the OnCurrent event for setting the value of the
control.

For writing back any change, the AfterUpdate event should be OK but you
could also wait for the BeforeUpdate or the AfterUpdate events of the form
if you want to make some global verification before updating the table.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
Independent consultant and remote programming for Access and SQL-Server
(French)
 
S

Sylvain Lafontaine

Also, did you try to simply add this field to the query of the main form and
bind it to the control?

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
Independent consultant and remote programming for Access and SQL-Server
(French)
 
C

CW

No, I created a subform with the foreign table as its source, added that one
control to it, and placed this on the Main form.
Now, could I please have the code to do what you have suggested.
Many thanks
CW
 
S

Sylvain Lafontaine

I'm not sure about what code you are talking exactly. What remains to do is
strongly related to your current design and cannot be written without it.

If you don't know how to use events such as the OnCurrent even or how to
change the values of a record on a backend table using SQL commands; you
should say so so that we could understand what are the other things that
need to be explained.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
Independent consultant and remote programming for Access and SQL-Server
(French)
 
C

CW

I am talking about the code that you yourself suggested as a solution.
I am familiar with writing SQL and VBA code, and using events. I have given
the names of my tables and forms and controls. I cannot see what more you
need to know about my design. Most people in this discussion group, when they
suggest code as a solution, readily provide that code. Sometimes it needs a
bit of adjustment to work perfectly in one's particular situation and I am
capable of doing that. It is very odd that having suggested it, you are so
reluctant to provide the code!
 
E

Eighte

James Hall said:
(e-mail address removed)
news:[email protected]... hehehh
I know but they wouldn listen. You know price will blucktuat.
You know I mean it. Aren`t I your DaughtereiI?
I also have frmEvents, based on tblEvents, which records the progress of
inquiries and orders. is it very DYI=Do your Interlectures?]hehhehe.
One important field, BookedDate, is in tblEvents and is usually updated
on
frmEvents.
[You can add in and line and it must be explained as figures of listens due
to so susah nak concerntrate. There is something put heavily at half of my
skull. fifi the girls.
VOID-It`s a must to know the progress of body and thinks=Physical healthy
beings for the future.
Love it? History class form 2. Takuya and I slept. Boring.
Slurts...Snores..Love...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top