VirtualHuck
New member
- Local time
- Today, 14:18
- Joined
- Feb 11, 2025
- Messages
- 3
This is my first post, please let me know if there is a better place to post this question.
I have an access database that functions as a time log for about 10 employees (split into front and backend). It has been working well and I've slowly been making tweaks to it.
I suddenly started getting an error anytime a filter is applied on a form that is set with vb code relating to DatePart function. For example, I have an On Open Event Procedure for a form that applies a filter that uses DatePart and it has an error "Data Type mismatch in criteria expression".
The thing that has me confused is that I haven't made any changes to that form in the database and it was working for many months previously. There are other forms doing the same thing.
I'm wondering if there is any current database setting or global database setting that I could have changed mistakenly with some weird keyboard shortcut combination or something weird like that. I opened an older backup of the database and am getting the same error (it worked when it was backed up).
I took a little time trying to "fix" one of the filter expressions (no success), but then realized I have many places in the database having the same issue so it seems like the code may not be the issue, but something else...
I found one post about someone changing from ANSI-89 to ANSI-92 (or vice-versa) by mistake (setting is in Options>Object Designers>SQL Server Compatible Syntax), but that doesn't seem to be the case for me.
Can anyone think of a setting I may have changed or reference that is needed that got lost or anything? If not, I need to do more troubleshooting to provide the specific code issues, but I don't think the code is the issue.
I have an access database that functions as a time log for about 10 employees (split into front and backend). It has been working well and I've slowly been making tweaks to it.
I suddenly started getting an error anytime a filter is applied on a form that is set with vb code relating to DatePart function. For example, I have an On Open Event Procedure for a form that applies a filter that uses DatePart and it has an error "Data Type mismatch in criteria expression".
The thing that has me confused is that I haven't made any changes to that form in the database and it was working for many months previously. There are other forms doing the same thing.
I'm wondering if there is any current database setting or global database setting that I could have changed mistakenly with some weird keyboard shortcut combination or something weird like that. I opened an older backup of the database and am getting the same error (it worked when it was backed up).
I took a little time trying to "fix" one of the filter expressions (no success), but then realized I have many places in the database having the same issue so it seems like the code may not be the issue, but something else...
I found one post about someone changing from ANSI-89 to ANSI-92 (or vice-versa) by mistake (setting is in Options>Object Designers>SQL Server Compatible Syntax), but that doesn't seem to be the case for me.
Can anyone think of a setting I may have changed or reference that is needed that got lost or anything? If not, I need to do more troubleshooting to provide the specific code issues, but I don't think the code is the issue.