Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sql UPDATE table query 1

Status
Not open for further replies.

paulminne

Programmer
Nov 27, 2002
80
AU
Hi,

I am having trouble with an UPDATE query which is very simple. I am trying to simply update a number field in a table with an integer stored in a variable.

The syntax:

DoCmd.RunSQL "UPDATE STOCKFORSALE SET [QTY]= intQTY WHERE [stockID]=" & Me.txtStockID.Value

The Error:

A box is appearing asking me to enter the intQTY value...

Any suggestions welcome, I think it may have something to do with my " & etc...

Thanks in advance!
 
DoCmd.RunSQL "UPDATE STOCKFORSALE SET [QTY]=" & intQTY & " WHERE [stockID]=" & Me!txtStockID

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top