I am having a spot of bother with getting locked out of Access if any of the references to tables as DAO recordsets is wrong. It starts off with the normal "cannot find xxx" but when you click OK I get a new box "Object variable or with block variable not set"
You can hit the OK button till you are blue in the face but the only way I seem to be able to get out of it is to invoke Task Manager and end Access.
Partly it is my own fault in that in one database I have used a table name lblActivitiesLog but latterly I have been using the name tblActivityLog. If I copy a form from the wrong database and pop it into the new one and do not remember to check the reference and change it from
to
I get the problem
Is there any error trapping I could do to try and work around this
Any thoughts would be really appreciated.
You can hit the OK button till you are blue in the face but the only way I seem to be able to get out of it is to invoke Task Manager and end Access.
Partly it is my own fault in that in one database I have used a table name lblActivitiesLog but latterly I have been using the name tblActivityLog. If I copy a form from the wrong database and pop it into the new one and do not remember to check the reference and change it from
Code:
Set rstAct = dbs.OpenRecordset("tblActivitiesLog")
Code:
Set rstAct = dbs.OpenRecordset("tblActivityLog")
Is there any error trapping I could do to try and work around this
Any thoughts would be really appreciated.