G
Guest
Hi
Apologies if this has already been covered. I have tried searching the web
and this site, but I have been unable to find any mention of this problem. I
am using Access Version 2003 (11.6566.6568) SP2.
As the title says, Access is changing the criteria in a couple of queries
whenever I save a specific form's VBA code. The manner of the change to the
query criteria is that the criteria refers to a different form than the one
it should do. This causes the queries to fail as the newly referenced form
doesn't contain the fields expected.
The queries should refer to the form whose VBA code I am changing. However,
upon saving the VBA code (and the form itself, I suppose) the queries have
their criteria altered. An example:
Correct criteria in a query:
Forms!frmMainTab!txtDateTo
After saving the VBA code changes to frmMainTab, query says:
Forms!frmAssignCodes!txtDateTo
The queries altered are used in frmMainTab, but at no time do I change the
query or open the query or involve the query in any way. At all. As far as
I know, of course.
I can make the queries work again by editing them so they again refer to
frmMainTab, but this is not ideal as I am sure you can imagine. I have tried
Compact and Repair, exporting to a new database etc, but nothing has worked.
Any ideas as to why this is happening?
Thanks
Apologies if this has already been covered. I have tried searching the web
and this site, but I have been unable to find any mention of this problem. I
am using Access Version 2003 (11.6566.6568) SP2.
As the title says, Access is changing the criteria in a couple of queries
whenever I save a specific form's VBA code. The manner of the change to the
query criteria is that the criteria refers to a different form than the one
it should do. This causes the queries to fail as the newly referenced form
doesn't contain the fields expected.
The queries should refer to the form whose VBA code I am changing. However,
upon saving the VBA code (and the form itself, I suppose) the queries have
their criteria altered. An example:
Correct criteria in a query:
Forms!frmMainTab!txtDateTo
After saving the VBA code changes to frmMainTab, query says:
Forms!frmAssignCodes!txtDateTo
The queries altered are used in frmMainTab, but at no time do I change the
query or open the query or involve the query in any way. At all. As far as
I know, of course.
I can make the queries work again by editing them so they again refer to
frmMainTab, but this is not ideal as I am sure you can imagine. I have tried
Compact and Repair, exporting to a new database etc, but nothing has worked.
Any ideas as to why this is happening?
Thanks