473,386 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 18191

"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 = MyConn.Execute(SQL) End If MyConn.Close Set...
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 ASPFAQ and came up blank. Where can find the "rules"...
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 fine for some time, but it now tends to bomb out...
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 command button or double click the frmAnimal from 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 This first line is the line that has a problem...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.