Query not working on some computers

mad-q

Registered User.
Local time
Today, 20:53
Joined
Feb 14, 2010
Messages
61
Hello,

I have a macro which runs several queries, some of these queries do not work on some of my computers. It doesn't bring up any error message and looks like it is running properly.

I'm not sure where to start looking for a problem. If I run the query on its own then it works fine.

Any ideas would be very grateful.
 
depending on the type of queries you can perform several pre-checks.
If you have an update query first show a message box showing the number of records to be updated and then run the query. After that count the number of records to be updated when you run the query again. The second time you run the query the number of records to be updated should be 0.
Example:
The message box:
Code:
msgbox "The number of records to be updated using the following query will be: " & dcount("field1","table1","field2=false")
After the message execute the query.
Code:
update table1 set field1=true where field2=false
Code:
msgbox "The number of records to be updated using previous query will be: " & dcount("field1","table1","field2=false")
This should be 0. If not, the update wasn't perfomed.

I don't have macro experience so i can't help you there but if you set up a range of queries with a pre- and postcheck you can pinpoint the problem more easily.

HTH:D
 
Many thanks, that really helped and found the problem. STAR!!
 

Users who are viewing this thread

Back
Top Bottom