472,353 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

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 18057

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: alexz | last post by:
valuA = (request.form("toadd")) If valuA = "" then SQL = "UPDATE CourseReg SET attended='Active' WHERE ID IN("&request.form("toadd")&")" Set RS =...
29
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched...
4
by: dcarson | last post by:
I've read about this error in several other discussions, but still can't seem to pinpoint the problem with my code. Everything seemed to be working...
3
by: Lumpierbritches | last post by:
Syntax Error (missing operator) in query expression =BLANK'S MOLLIE-PRINCE BRUISER-3/14/2004-03 AnimalID is correct. I'm trying to open with a...
1
by: Justin R | last post by:
Hey I am really stuck and can't figure out what is wrong here is the code line and surrounding code, if anyone can help i would appreciate it. Thanks...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.