472,811 Members | 1,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,811 software developers and data experts.

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

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
5 21147
PEB
1,418 Expert 1GB
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
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
32,534 Expert Mod 16PB
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
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
32,534 Expert Mod 16PB
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

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

Similar topics

29
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
3
by: CLarkou | last post by:
On a client's machine with Office 97, my access program gives an error "The Expression you entered refers to an object that is closed or doesn't exist" when I am assigning a value in the checkbox....
2
by: Terry Bickle | last post by:
Please forgive me for using the wrong term here or there. I'm an old Excel 4 macro guy who didn't convert to VB and I'm tinkering with an Access 2000 DB. I'm sure there is a simple Access 101...
2
by: Michelle | last post by:
Hello all, I recently inherited a SQL 7.0 Server db accessed by a 2000 Access interface. When I try to open "Shipping Check Out" I am greeted with the following: The expression On Load you...
17
by: Peter Tenk | last post by:
Hi I've never really worked with VBScript - I'm an old-fashioned HTML guy - but I thought I'd have a go because I wanted to do something REALLY SIMPLE in my Access 2000 database. This is a plea for...
2
by: Joey | last post by:
Hello guys, I'm trying to learn about regular expressions. I need to be able to use an RE that can evaluate for STRINGS (or specific sequences of characters), not just occurances of characters....
4
by: bizt | last post by:
Hi, Im looking for a regular expression to check that a entered filename is valid. I have a cms Im building where the user can enter the name of a file, enter content and then click Save where...
0
by: Peted | last post by:
Hi, im having some trouble with reg expression pattern matching for something i think should be a straightforward test. Im validating the text being entered in a winforms textbox and i need...
3
by: MyWaterloo | last post by:
I am trying to open my purchase orders form and go to the last record. In the on open command I do: DoCmd.GoToRecord , , acLast Seems straight forward enough...but I keep getting this message...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.