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

Syntax Error (Missing Operator) in query expression

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a

"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

P: n/a
instead of writing so many lines u could have tell me the answer

Nov 13 '05 #3

P: n/a
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

P: n/a
"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.