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!

Proper syntax for LOAD and UNLOAD

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Can anyone please provide a brief example of the correct method for using LOAD and UNLOAD. I'm trying to load a form into memory and have it display when certain conditions are met. I used the example in the MS Access help file, but it didn't work. The code crashes right at the line containing the LOAD command. The code that I used is as follows:

LOAD "MsgForm"
MsgForm.Show


The code never gets past the LOAD statement.
 
I'd love to see that too.
The syntax you use is obivously wrong, as "msgForm" is a string, and you need an object.
Apart from that, I use load and hide in VB without any trouble, but never in VBA: I never succeeded in refering to an unopened form. The object-model is a bit confusing, :-( the forms-collection refers to the opened forms.

I gave up without really trying though, because docmd.openform("msgForm") does what you usually need: load and show.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top