By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,495 Members | 1,002 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,495 IT Pros & Developers. It's quick & easy.

a really annoying update SQL problem

P: 12
I have a db with the primary key of Test_Number which is an autonumber.

Every time i run this update query Access tries to set every fail record to true instead of just Test_Number 1. can someone please tell me what is wrong with the where clause?

dim updateFail as String

updateFail = "Update Tests Set fail = true Where Test_Number = '1';"

DoCmd.RunSQL updateFail


Thanks
Feb 3 '08 #1
Share this Question
Share on Google+
2 Replies


P: 83
I have a db with the primary key of Test_Number which is an autonumber.

Every time i run this update query Access tries to set every fail record to true instead of just Test_Number 1. can someone please tell me what is wrong with the where clause?

dim updateFail as String

updateFail = "Update Tests Set fail = true Where Test_Number = '1';"

DoCmd.RunSQL updateFail


Thanks

Since Test_number is autonumber (numeric) you do not need quotes.
You did not say the data type of [Fail] , you will need quotes if it is text.
Feb 3 '08 #2

P: 12
fail is a boolean.
i have tried with and without the quotes. no change
Feb 3 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.