Hi guys,
I have a split database with 7 tables. It's currently working just fine with an Access stock system that I wrote a few months ago.
I just added two more tables to the backend database to add a record of repairs to stock. I then removed all of the tables from the application and re-linked everything. Everything as before. works just fine. No errors. But...
I then wrote another "form". As this form is very similar in operation to another one in the system I have, I generated a copy and modified the new form for the new purpose merely changing the text box references, names and all the pointers/code to the new tables (just to give you an idea of the background of how I did this).
I have a Save routine (on a button) that in the opening few lines of code, specifies the database file to open the connection to be:
"mydb = Me.DBinUse"
which is the current database that I am using. On all other forms this command works fine. On the new form it doesn't.
The command on this new form always throws an error which states: "Compile Error: Method or data member not found"
Ok, so... Bearing in mind that a lot of the code here was originally part of another form, If I try and code this on the old form (the one I got the layout from), when I type Me. the dropdown list appears to give you the option to select an "entity".
"DBInUse" IS on this dropdown list and I can select it.
On the new form, if I try to code it and type Me. "DBInUse" isn't in the drop down list. This is obviously at the root of the problem hence the "Method or Member not found" message. what I don't understand though is where the form gets this property variable or member from?? It's not a variable on either form.
I'm using the "Change Backend Database" routine that I found on here somewhere. It works very well and I've not had any issues up to now. I'm not sure if this routine is interfering or has anything to do with the DBInUse entry. Maybe it regsiters this name/word somewhere. Can anyone confirm this?
What I do know though it that a variable isn't being called globally as on all the forms that work (and this one) there is no Option Explicit defined to pick a variable up. It must be a part of the system somewhere. Question is: How to I bring it into this particular form?
I apologise if what I'm saying here isn't clear and I hope someone knows what I'm on about!
Thanks guys.
I have a split database with 7 tables. It's currently working just fine with an Access stock system that I wrote a few months ago.
I just added two more tables to the backend database to add a record of repairs to stock. I then removed all of the tables from the application and re-linked everything. Everything as before. works just fine. No errors. But...
I then wrote another "form". As this form is very similar in operation to another one in the system I have, I generated a copy and modified the new form for the new purpose merely changing the text box references, names and all the pointers/code to the new tables (just to give you an idea of the background of how I did this).
I have a Save routine (on a button) that in the opening few lines of code, specifies the database file to open the connection to be:
"mydb = Me.DBinUse"
which is the current database that I am using. On all other forms this command works fine. On the new form it doesn't.
The command on this new form always throws an error which states: "Compile Error: Method or data member not found"
Ok, so... Bearing in mind that a lot of the code here was originally part of another form, If I try and code this on the old form (the one I got the layout from), when I type Me. the dropdown list appears to give you the option to select an "entity".
"DBInUse" IS on this dropdown list and I can select it.
On the new form, if I try to code it and type Me. "DBInUse" isn't in the drop down list. This is obviously at the root of the problem hence the "Method or Member not found" message. what I don't understand though is where the form gets this property variable or member from?? It's not a variable on either form.
I'm using the "Change Backend Database" routine that I found on here somewhere. It works very well and I've not had any issues up to now. I'm not sure if this routine is interfering or has anything to do with the DBInUse entry. Maybe it regsiters this name/word somewhere. Can anyone confirm this?
What I do know though it that a variable isn't being called globally as on all the forms that work (and this one) there is no Option Explicit defined to pick a variable up. It must be a part of the system somewhere. Question is: How to I bring it into this particular form?
I apologise if what I'm saying here isn't clear and I hope someone knows what I'm on about!
Thanks guys.