Menu form with simple Docmd.OpenForm not working with runtime version

merika

Registered User.
Local time
Today, 10:58
Joined
Jun 18, 2012
Messages
16
I have finished the design of my DB and am ready to distribute it to my users. Everything seems to work fine and it installs great.

Upon opening the appication, users are presented with a form that serves as the main menu. On the form there are 4 buttons:
1. To search for records
2. To enter new data
3. To edit existing data
4. To exit the application

Although everything works fine on my PC woth the full version of Access 2010, the following error pop up on the users PC´s with the runtime version (I´m the only one in the company with a full blown version):T

The expression "On Click" you specified as the value of the property from the failed event.
*expression does not result in the name of a macro, a user-defined function, or [Event Procedure]
*There was an error evaluating the function, event or macro

And it stops there. The users are not able to continue. The code behind the buttons is pretty simple:

Code:
Private Sub cmdBuscar_Click()
DoCmd.OpenForm "frmBuscar", , , , , acDialog
End Sub

Private Sub cmdNueva_Click()
DoCmd.OpenForm "frmDataentry", , , , , acDialog
End Sub

Private Sub cmdDataEntryBoats_Click()
DoCmd.OpenForm "frmBarcoInfo", , , , , acDialog
End Sub

Private Sub cmdClose_Click()
DoCmd.CloseDatabase
End Sub

Any suggestions out there on what it is that can go wrong here? Even to me, this is very simple straight forward VBA code to open up a form, nothing more.
 
First off, go into your database and go to the VBA Window and click on DEBUG > COMPILE <yourprojectnamehere> and then see if it tells you that there are any errors. If so, fix it and then do it again until no errors show up.

Sometimes what it seems is not really what the problem is when dealing with Access. It most likely has nothing to do with your form opening code, but is something else causing a compile error.
 
It was, something else that is.... just found out via somewhere else that it might have to do woth saving the form in view mode, not in design mode. Made a copy of the form, packaged again and now it works liek a charm :)

It is however very strange in my eyes.... how come the form works well on my PC but with the runtime version you can´t have it saved in normal view mode. Must be some Microsoft logic behind this all!

(Tried the debugging earlier on as well, no errors came up during that proces).
 

Users who are viewing this thread

Back
Top Bottom