How exactly did you declare RawTOL?
Need help with "Compile Error: Type Mismatch"
I have a procedure to export some queries from Access to Excel. It worked yesterday afternoon, but today it's giving me an error. I'm pretty sure I didn't make any changes since the last time it worked, and the type mismatch isn't making sense to me. Here's the portion of code that's raising the error:
I have variable declaration earlier in the procedure:
Only the 3rd query def is causing an error even though it follows the same format as the previous 2. What's the problem here?
Microsoft 365 and Office | Access | For business | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
11 answers
Sort by: Most helpful
-
-
Anonymous
2024-10-08T16:34:13+00:00 In the 2nd screenshot: "RawTOL As QueryDef". Same as the other two queries.
-
DBG 11,531 Reputation points Volunteer Moderator2024-10-08T16:50:10+00:00 In the 2nd screenshot: "RawTOL As QueryDef". Same as the other two queries.
Just as a test, try changing that to:
RawTOL As **DAO.**QueryDef
-
Anonymous
2024-10-08T17:10:37+00:00 Still raising the same error
-
George Hepworth 22,220 Reputation points Volunteer Moderator2024-10-08T18:11:38+00:00 What are the data types of "LeaveDate" and "ExportMonth"