469,366 Members | 2,428 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,366 developers. It's quick & easy.

Syntax Error (Missing Operator) in query expression

getting, error, 3075
Syntax Error (Missing Operator) in query expression '8WHERE
[Products].[ProductID]=1'
Dim TotalQty As Integer
TotalQty = DLookup("[QtyOnHand]", "[Products]", "[ProductID]=" &
Forms![tblProductUpdate]![Prod**uctID])
If (TotalQty - [Quantity]) < 8 Then
MsgBox "Inventory Below 0. Quantity Issued is To High!"
Cancel = True
Exit Sub
End If
TotalQty = TotalQty - [Quantity]
DoCmd.SetWarnings False
DoCmd.RunSQL ("UPDATE [Products] SET [Products].[QtyOnHand] =" &
TotalQty & _
"WHERE [Products].[ProductID] = " &
Forms![tblProductUpdate]![Prod**uctID])
AM i MISSING SOME THING in UPDATE QUERY

Nov 13 '05 #1
4 17757

"khan" <ah******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
getting, error, 3075
Syntax Error (Missing Operator) in query expression '8WHERE
[Products].[ProductID]=1'
Dim TotalQty As Integer
TotalQty = DLookup("[QtyOnHand]", "[Products]", "[ProductID]=" &
Forms![tblProductUpdate]![Prod**uctID])
If (TotalQty - [Quantity]) < 8 Then
MsgBox "Inventory Below 0. Quantity Issued is To High!"
Cancel = True
Exit Sub
End If
TotalQty = TotalQty - [Quantity]
DoCmd.SetWarnings False
DoCmd.RunSQL ("UPDATE [Products] SET [Products].[QtyOnHand] =" &
TotalQty & _
"WHERE [Products].[ProductID] = " &
Forms![tblProductUpdate]![Prod**uctID])
AM i MISSING SOME THING in UPDATE QUERY

You have posted this same message with different subjects at least four
times. That is extremely rude. Your question has been answered elsewhere.
Nov 13 '05 #2
instead of writing so many lines u could have tell me the answer

Nov 13 '05 #3
DoCmd.RunSQL ("UPDATE [Products] SET [Products].[QtyOnHand] =" &
TotalQty & _
"WHERE [Products].[ProductID] = " &
Forms![tblProductUpdate]![Prod**uctID]

Should be:

DoCmd.RunSQL ("UPDATE [Products] " & _
"SET [Products].[QtyOnHand] =" & _
TotalQty & " " & _
"WHERE [Products].[ProductID] = " & _
Forms![tblProductUpdate]![Prod**uctID]
You need a space between the TotalQty and the WHERE.

Nov 13 '05 #4
"khan" wrote
instead of writing so many lines
u could have tell me the answer


For good suggestions on effective use of newsgroups, see the FAQ at
http://www.mvps.org/access/netiquette.htm. You will see that posting the
same question multiple times, or the identical question in multiple
newsgroups is, at least, strongly discouraged. Whining when reminded of the
rules does not endear you to the very people best qualified to answer your
future questions.

Larry Linson


Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.