By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,337 Members | 2,234 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,337 IT Pros & Developers. It's quick & easy.

The Expression On Open you entered.......Help!

P: 31
So close to finishing and then this error jumped out at me:

"The expression On Open you entered as the event property setting produced the following error: Member already exists in an object module from which this object module derives"

This has been caused by the (extremely enjoyable) exporting of my database into another despite me making sure that all reference .dll files where added and copied to the correct locations.

I think I understand what the error is caused by but I cant find the problem as the debugger is sod all use as it never gets the chance to kick in.

To test the problem I edited out "Form_Open", the error was still there but now moved onto the next event "On Load". After I had edited out all "On **" events which activate before the form opens, the form finally loads. I then attempted to add the "On Open" event back in with no code in it.

i.e.

Private Sub Form_Open(Cancel As Integer)

End Sub

Impressively it still doesnt like this despite there being no code in it???

I am sure that I have gone through the form's code and checked that their are no clashes with the other database's modules but I am at a loss.

Any pointers???

Cheers for any help :)
Jan 9 '07 #1
Share this Question
Share on Google+
5 Replies


PEB
Expert 100+
P: 1,418
PEB
So close to finishing and then this error jumped out at me:

"The expression On Open you entered as the event property setting produced the following error: Member already exists in an object module from which this object module derives"

This has been caused by the (extremely enjoyable) exporting of my database into another despite me making sure that all reference .dll files where added and copied to the correct locations.

I think I understand what the error is caused by but I cant find the problem as the debugger is sod all use as it never gets the chance to kick in.

To test the problem I edited out "Form_Open", the error was still there but now moved onto the next event "On Load". After I had edited out all "On **" events which activate before the form opens, the form finally loads. I then attempted to add the "On Open" event back in with no code in it.

i.e.

Private Sub Form_Open(Cancel As Integer)

End Sub

Impressively it still doesnt like this despite there being no code in it???

I am sure that I have gone through the form's code and checked that their are no clashes with the other database's modules but I am at a loss.

Any pointers???

Cheers for any help :)
Try after backing up ur database:

Go in form properties and especially to Has module property

Turn it off!

then recreate all events in ur form!
Jan 9 '07 #2

P: 31
Try after backing up ur database:

Go in form properties and especially to Has module property

Turn it off!

then recreate all events in ur form!
Cheers for the help. Gave it a try but with no success.

Found the problem a few mins ago. I cut all the code out of the form and pasted it back in bit by bit (not a fun job, it was over 60 pages long in word!)

The offending sub was called - Private Sub CarClaimCost()

I have no idea why it is clashing with anything but as soon as it is removed the form loads fine.

Still totally confused but at least I can get around it.

Cheers again for the help :)
Jan 9 '07 #3

NeoPa
Expert Mod 15k+
P: 31,494
Sometimes Access gets its knickers in a twist :(.
When this happens I :
1. Cut my code out and save it in a text editor.
2. Save offending object.
3. RePaste code back into object.
4. Compile project.

Normally works after that.
Jan 9 '07 #4

P: 1
I found my answer on ** Link to competing forum removed as per site rules **
In short; refresh all your references (When working on different computers this migth also be your solution)
GRTZ Jeroen
Nov 18 '08 #5

NeoPa
Expert Mod 15k+
P: 31,494
We appreciate your posting your answer Jeroen, but unfortunately (I'm sure accidentally) your link violates our rules so I've had to remove it.

Nevertheless, we like your thinking and welcome to Bytes!
Nov 19 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.