Close Form generates an "Enter Parameter" dialog with form maximized

  • Thread starter Thread starter Sierras
  • Start date Start date
S

Sierras

I have a very strange problem with one of my forms.
I have a close button on the form which basically just closes the form.
And it works fine. But when I set the form's On Open event to
DoCmd.Maximize, the close button now produces an "Enter Parameter Value"
dialog - looking for Forms!frmName!IDName.

When I get rid of the On Open event, the problem goes away.
Any ideas?
 
The open event of a form is too early to reference any controls. You should
move the refence to the Load event.
 
No there is no other event on the form or it's subform. And it also does
the same thing on Load event. I do have a few After Update events that
are used on combo boxes. But I don't think that would have anything to do
with it..
 
I've run into a similar issue, and have a work-around, but not an
explanation.

If you add
DoCmd.Restore
to your OnClose event, I believe this may eliminate the parameter prompt.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

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

Back
Top