How to open a form from a double-click event

M0E-lnx

Registered User.
Local time
Today, 12:12
Joined
Sep 3, 2008
Messages
62
I want to set up a double-click event for an object and I want it to open another form.

I've tried Forms![Name_Of_Form].activate
but the debugger keeps saying it can't find the form I'm specifying.

Anyone know how this should be done?
 
Use the Command Button wizard to create a button to open a form. Then copy the code it creates to the DoubleClick event you want to use and then delete the Command Button.
 
I want to set up a double-click event for an object and I want it to open another form.

I've tried Forms![Name_Of_Form].activate
but the debugger keeps saying it can't find the form I'm specifying.

Anyone know how this should be done?

Well, the likelihood is that it can't find the form you are specifying because you aren't opening it. You are trying to activate an object that is closed.

The correct syntax for opening a form would be:

DoCmd.OpenForm "YourFormNameHere"
 
formname.activate (or whatever syntax is actually correct) brings to the top a form thats already open

docmd.openform formname opens a form
 

Users who are viewing this thread

Back
Top Bottom