Load Statement - Access97

  • Thread starter Leonard Priestley
  • 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
 
M

MacDermott

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top