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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update query based on autnumber field problem

Status
Not open for further replies.

Maggie24

IS-IT--Management
Jun 29, 2004
36
IE
Hi all,

I have a form based on a table which has the Product No (autonumber) as the PK.

i ahve an update query which will update fields in my table as follows:

Update tblproducts set primary_material_no = '" & Combo59.Value & "' , secondary_material_no = '" & Cbo_subcategory.Value & "', Updated = 1 where [Product No] = '" & [Product No].Value & "'"


when product no is an autonumber, the query wont work but when i change product no to a text value it does work.

Is there anyway i can use my update query with the Product No field as an autonumber?

Cheers,

Maggie

"Work is the curse of the drinking classes
 
For a Text Field ->
Where [Product No] = '" & [Product No].Value & "'"

For a Numeric Field (don't use single quotes)->
Where [Product No] = " & [Product No].Value
 
Thank you Harold, I will try this.

"Work is the curse of the drinking classes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top