Load Statement - Access97

  • Thread starter Thread starter Leonard Priestley
  • Start date Start date
L

Leonard Priestley

I have two forms, Form1 and Form2. In the code behind Form2 I have tried
using the statement ' Load Form1', which is about what the Load Statement
example does. However, when I try compiling I get an error message
"Variable not defined". Can someone tell me what I'm missing please.

Leonard Priestley
 
Yes, I see that statement in the Visual Basic Help file -
I can't imagine why it doesn't mention that it's not appropriate in the
Access flavor of VBA.

In Access, the command is
DoCmd.OpenForm "Form1"
If you need it to open but not be visible, add an argument of acHidden.
The help file will give you the correct syntax.

HTH
- Turtle
 
Back
Top