|
-
Oct 26th, 2004, 06:39 PM
#1
Thread Starter
Hyperactive Member
SQL Sentence in VB-GOING MAD!!!!
I use the following code and get "Syntax error in update statement". I have tried modifying but to no avail, HELP!!!!
VB Code:
If SetI(Index).Value = 1 Then
acn.Execute ("update settings set " & settings.Fields(Index).Name & " = " & True & " ")
Else
acn.Execute ("update settings set " & settings.Fields(Index).Name & " = " & False & " ")
End If
1.SETI is just an index of checkboxes
2.when it erroed, settings.fields(index).name was the name of the field I wanted to change
3.settings is a table of one line containing 5 fields of boolean fields
4.darn this!!!!
Last edited by Blacknight; Oct 26th, 2004 at 06:59 PM.
-
Oct 26th, 2004, 06:42 PM
#2
Are there spaces in the field names? You'll needto enclose in [] brackets for an access database if so.
BTW, is that ADO or DAO?
-
Oct 26th, 2004, 06:54 PM
#3
Thread Starter
Hyperactive Member
There are no spaces in the name. the name is language. I am using ADO.
-
Oct 26th, 2004, 06:54 PM
#4
Thread Starter
Hyperactive Member
could that be a saved name?
-
Oct 26th, 2004, 06:59 PM
#5
Thread Starter
Hyperactive Member
Yep, thats the problem. It suddenly donned on me that it error on a specific index which wasn't even called, which led me to believe it was a saved name.
-
Oct 26th, 2004, 07:00 PM
#6
Thread Starter
Hyperactive Member
Thank god, I was just about to bang my head very hard on the wall.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|