Hi,
It could be a corruption of the query objects stored in Access. 3 things you can try:
- Go to SQL view of the query and copy the SQL text into a new query. Does that new query work?
- Create a new accdb and import all objects from the old database. There may be some warnings or errors when you try to import corrupt objects. Do the queries work in the new database?
- You can export the queries using VBA like this:
Application.SaveAsText acQuery, "YourQueryName", "c:\YourQueryName.txt"
and import it back again:
Application.LoadFromText acQuery, "YourQueryName", "c:\YourQueryName.txt"
If all this doesn't help then it becomes really interesting, ;-) because it might be an Access bug. There's currently another bug in queries that crashes Access. To determine whether you have a different variant, we would need to know more details, e.g. the SQL statement of your query. It would be best if you made a small sample database with only the absolutely necessary objects and test data available for download somewhere so that we can reproduce the problem.
Servus
Karl
Access DevCon - online conference April 18+19
Access Forever
Access News
Access-Entwickler-Konferenz AEK