As far as I know, I do not have any macros. I also tried your suggestion about opening the MDB with the shift key, and it did not change the 3 separate warnings I get.
My current theory is that there are queries attached to controls (usually listboxes) that refer to hidden textboxes. Normally, the Form Load procedure appears to try and make sure that these get populated by
forcing a "Click" event whose VBA code sets the textbox. As I had added a few new listboxes that behaved similarly, I also tried to add equivalent behavior, but to no avail.
Another weird thing is that after getting these 3 warnings, the app itself seems to behave perfectly fine!
While testing, I took one of these queries and manually created a new query and tried to run it, and saw the problem occur. So initially, I thought
"I found it". I assume that by running the query (when I am in design mode, BTW), that the reference to the Form textbox simply was not set, and that was what was causing the problem at startup as well. The problem with this theory is that the original application had many similar queries just like this one, and did not have these warnings. This makes me think that there is some other stupid issue somewhere.
Here is an example of the one I mentioned above:
Code:
SELECT [Certification List].ID,
[Certification List].Certification,
[Group List].Group,
[Group List].ID
FROM [Group List]
INNER JOIN ([Certification List]
INNER JOIN [Group Certifications] ON [Certification List].ID=[Group Certifications].Certification_Id)
ON [Group List].ID=[Group Certifications].Group_Id
WHERE ([Group List].ID=CInt(forms.[Employee Certification Tracking].txtGroupCertsGroupId));
The textbox item is the "forms.[Employee Certification Tracking].txtGroupCertsGroupId)".
Thanks for helping me work through this!
Another post somewhere mentioned that a type mismatch might be the culprit. I initially thought
that might be my problem, as I had a couple of places where I was testing a text field on the form
to an integer ID value from the table. So I surrounded one of these places with the CInt function,
but 1) it did not change the behavior, and 2.) the original app had several places where it did NOT
use CInt (and others where it did).
Mitch
Originally Posted by
June7
If this happens when project opens the issue is in code that executes when project opens. This could be an Autoexec macro or form that is set as default for the project. Are you running mdb/accdb (as opposed to mde/accde compiled executable)? Hold down the shift key as mdb/accdb file opens. This should override Autoexec and many default project settings, such as the default open form. This should offer clue on where to look.
I agree, avoid spaces, special characters, punctuation (underscore is exception) in names and reserved words as full names. I just thought the brackets would make the code accept them. Something even more special about /?