The expression On Open you entered...." (1 Viewer)

jd_boss_hogg

Registered User.
Local time
Today, 13:23
Hi All - hoping some kind soul can help....

I have a split database. All on same network, everybody using 2003. I am a NOT a programmer, more of a cut and paster, so please excuse if i seem ignorant...

Frontend works on all computers except 2. On these 2, when you try to open the dbase you get the error message "The expression On Open you entered as the event property setting produced the following error: Object or class does not support the set of events"

I think the "on open" is referring to the switchboard that i use as a menu system which loads when the database is started. The on open code is:

Code:
Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.
    ' Move to the switchboard page that is marked as the default.
    Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
    Me.FilterOn = True
End Sub

This works on all PC's (6 in all) except 2 of them. If i rem out the code lines so nothing happens, then those 2 that will not open actually open, except that all PC's can then only access the first menu page and not any sub menus.

I dont know why this doesnt work on 2 systems but works on the others? Ive googled all other instances of this error code method that i can find, and cant come up with an answer?

I'd greatly appreciate any advice.
 

Ranman256

Well-known member
Local time
Today, 07:23
dont put the code in FORM OPEN
put it in FORM LOAD
(sometimes the controls dont resolve in OPEN)
 

jd_boss_hogg

Registered User.
Local time
Today, 13:23
Thanks - tried that, but now my error just changes to "the expression on load" instead of the expression on open.... however, is seems like no expressions work because when i click a button on the form to close and exit the database, i get a warning "the expression on click" so it appears nothing works. But the exact same copy of frontend works on all my other pc's.... and i must have copied it and recopied it tens of times now, always working on others, never on this one.

Seems like it's any form on this one PC, because it wont load anything without an "the expression" error.
 
Last edited:

jd_boss_hogg

Registered User.
Local time
Today, 13:23
It deletes the error code, but then i get another pop up window with another "on load" or "on open" and it reports an error with every bit of coding on this form... it looks like everything is screwed on the switchboard form. But this is exactly the same frontend which works perfectly on all the others?
 

spikepl

Eledittingent Beliped
Local time
Today, 13:23
The expression ... you entered errors have quite often a source not related to the event handler itself as such.

Check the references - see if any are missing - compare the list of references af the faulty db with the one in a working db

Try to compile - do errors pop up? Does it compile?
 

jd_boss_hogg

Registered User.
Local time
Today, 13:23
The frontend is (should be) exacly the same as the ones on the PC's that work. I simply copy/paste a working frontend from a good pc onto this PC, and it behaves completely differently. All are running 2003.

As i said, i'm a copyer/paster of code more than a programmer, so i will google how to compile and checking of references.....
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 21:23
Is there anything different about the problem machines?

If not then try a Repair Install for Access / MSOffice on one of the problem machines.
 

Users who are viewing this thread

Top Bottom