Can't execute function from form properties sheet

  • Thread starter Thread starter Gerry Goldberg
  • Start date Start date
G

Gerry Goldberg

I have and 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 and Access setting that I have missed on these three workstations?

Thanks,

Gerry Goldberg
 
Gerry Goldberg said:
I have and 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 and Access setting that I have
missed on these three workstations?

Thanks,

Gerry Goldberg

Is your database split into front-end and back-end, with a copy of the
front-end on each workstation?

Check for broken references on the PCs where it isn't working. See the
following link for details:


http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html

If your database isn't split and it's a references problem, you'll need
to either make the failing workstations conform to the required
configuration (same libraries registered in the same locations) or else
split the database, put copies of the front-end on each workstation, and
adjust the references in each copy of the front-end.
 
Back
Top