Disappearing form

aphelps

Bird Man
Local time
Today, 15:02
Joined
Aug 2, 2002
Messages
32
This is one of the top five craziest things I've ever seen. I have a form with 26 fields that is based on a query. Also on this form is a two-field subform. All that is fine. However, when I add the final piece, a second subform with 8 fields, then move from design to form view, the entire form is blank. When I delete the subform and go back to form view, it REMAINS BLANK.

The subform has a composite primary key (nest number and date) which is linked to the nest number on the main form. I haven't really done anything else fancy.

I will also say that the query on which the form is based goes blank when I add the second subform. The fields are still visible, but there are no data records (the DB is empty, but there should still be one row of blanks and zeros). Re-running the query does not return the blank row, regardless of whether the second subform is still there or if it has been removed.

What gives?

Thanks--Adam
 
I have seen that before. If the record source of the form is empty, nothing shows when the form is opened.

I had to test if there were any records in the record source in the forms on open event. If there were zero records, I gave a message box and closed the form.

HTH
 
Then the questions would be, why does the form appear just fine with the source tables/query empty until this subform is added? I mean, the purpose for this form is data entry--how does one enter data in a form that won't appear?

I understand that there are workarounds, and I'll check them out (try to put a few records in the tables then go back to the form). But I don't understand why the form appears before the subform is added, if it's because the query has no data.

Thanks--Adam
 
Just a thought for I do not know exactly how to tell you to proceed...

Are your subforms: Source Object, Link Child Fields and Link Master Fields correct so that they will show data if the data exists for all records and related records?
 
To handle the case where the result set is empty, you can set "Allow Additions" to Yes.
 

Users who are viewing this thread

Back
Top Bottom