Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't execute function from event property sheet

Status
Not open for further replies.

ggoldberg

MIS
Feb 7, 2003
27
I have an Access 2002 application that runs on my network, but something
has happened to the database that causes two of the work stations to have
the following problem. When trying to run any form in the application, I get
an error when the system tries to execute a function that is specified on
the events property page. For example, in the form frmMain, the OnOpen
property contains the following:
=DisplayOpenMessage()
This function is defined in the modApp module as:
Public Function displayOpenMessage() as boolean
msgBox "Application is opening"
displayOpenMessage = true
End Function

When I try to run this form, I get an error that says the function does not
exist. However, if I remove the OnOpen property entry from the property
sheet and insert the following code in the form, everything works fine.
Private sub frmMain_Open(cancel as Integer)
displayOpenMessage
End Sub.

Strangely, this only happens of three of the five systems on my network,
while the others run fine. All of the workstations are executing the same
.mdb which resides on the network. Can anyone tell me what is going on here.
Is there an Access setting that I have missed on these three workstations?

Thanks,

Gerry Goldberg

 
Gerry, try this in you OnOpen event property:
=displayOpenMessage()
Hope this helps, good luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top