Problem Opening Form

N

nobody

I'm having a problem opening a certain form. Basically, this form is in
a database that has been coverted from 2003 to 97. A certain form
doesn't seem to want to open. When opening it directly (ie. double
clicking on it) it gives the error message:

"The expression On Open you entered as the event property setting
produced the following error: .

*The expression may not result in the name of a macro, the name of a
user-defined function or [Event Procedure].
*There may have been an error evaluating the function, event, or
macro."

When trying to open it via a docmd.openform command:

"Run-time error '2501':

The OpenForm action was canceled.

You used a method of the DoCmd object to carry out an action in Visual
Basic, but then clicked Cancel in a dialogue box.
For example, you used the Close method to close a changed form, then
clicked Cancel in the dialogue box that asks if you want to save the
changes you made the form."

Does anyone know what the problem is? Because it seems to work fine
when running on Access 2003.
 
G

Guest

It sounds like you are using a method that was not available in 97.
Open the form in design view, open the VB editor, set a break point on the
first line of executable (not dims, not comments, not tags) code, switch to
form view and step through the code to see where it fails.
 

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