Subform not visible until data loaded

Gkirkup

Registered User.
Local time
Today, 06:33
Joined
Mar 6, 2007
Messages
628
I have a form with a combo box. Then a query on which a reference is made to the combo box, as a search criteria. Then a subform who's source is the query. Everything OK so far.
My problem is that the subform is completely blank until the combo box entry is made. Then the labels and controls appear together.
What I would like is for the empty form to be visible at startup, then the query data fills into the controls, as you would expect.
What am I doing wrong?

Robert
 
Set Allow Additions to YES on the SubForm and see what happens.
 
RG:
Allow additions is already set to 'Yes'.

Robert
 
What is AllowAdditions set to on the main form? IF it's set to No the subform this will override the subform's own setting and cause this probelm.
 
if allow additons is yes, BUT the query driving the subform is not updateable - you will get the same effect - the subform is blank, and all the controls are undefined
 
I have checked the main form, and 'Allow additions' is 'Yes'.
I am not sure how to know whether the query is updateable or not. I did not do anything special to the query - it is a query on two linked tables, and a search criteria that comes from a combo box on the main form.
One thing, if I replace the link to the combo box with [Enter a search] in the query, the subform does display. I tried putting a default value into the combo box, but that did nothing.

Robert
 
just open the query driving the subform, and see if you get a * line at the bottom to add new records, or try to edit a record - if you cant its non-updateable
 
Gemma: The query returns a single line from two tables and is not updateable. Can I make it updateable? Perhaps the fact that it's from two tables is what makes it not updateable?
Any other way that I can get my subform to display when empty?

Robert
 
Gemma: Do the labels on my subform not display because they are linked to controls that come from the query? I am wondering if I made new labels, if they might display? That would not be as good as the empty subform controls displaying, but it would be something.

Robert
 
if there are no records to display in the detail section, i think the headers wont show either - its not that the fields are even nulls, they are just undefined - dont exist

--------
search on here for "non-updateable queries" - you might find a way of making it updateable - sometimes you just want to display some data, and it doesnt matter - other times it does - its to do with keys, group by's and other stuff
 

Users who are viewing this thread

Back
Top Bottom