Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform doesn't always load, causes errors

Status
Not open for further replies.

tpolony

Programmer
Aug 9, 2003
17
0
0
US
I have a two-part problem with subforms not loading, no pattern that I can figure out. When I open a form containing a table-based subform, sometimes instead of showing rows of data, or in the case of no data, a blank row, it's just a blank, white blob where the subform should be. OR, when my code tries to set the recordsource for the subform dynamically as the main form is opening, it might say that the subform doesn't exist or isn't open (even though it works at other times). The subform does exist and should be open, since subforms load before the main form.

The second part of the problem is that when I close the form containing the "bad" subform, part of my close method says
DoCmd.OpenForm 'A'
Forms!A.Somefieldname = "dog".

I just opened form A, and I get a message saying that "A" is not open. This problem only occurs when I have the problem loading the subform. Otherwise, it loads OK.

Help! Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top