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

Update table - help

Status
Not open for further replies.

DaveCrate

Technical User
Jan 12, 2004
41
US
This is probably a common thread posted 10 times over.....

access 2007

I have a main form with a list box with 5 columns (one columnis unique_ID), of which a user would select the row to be updated with several text boxes from the main form

I've tried several things that I have searched out and now I think I'm totally confused.

Any help would be greatly apprciated.
 
Please explain a little more. Do you wish to select a row in the list box and to have the five different columns changed (updated) to match the textboxes selected? If so, an update query is probably best.

 
Thanks Remou!

sorry for the confusion - it's been my state lately
user to select a row in list box (requestdate, PO#, vendor#, Supplier, rquest_ID)

Then

enter BOL#, Shipdate, and vehicle# into text boxes on the main form

update THAT row selected in the table with the BOL#, Shipdate, and vehicle#.

I hope this helps, again thanks for your time
 
Something like ... ?

Code:
strSQL="UPDATE tblTable SET [BOL#]=" & Me.[txtBOL#] _
& ", Shipdate=#" & Me.txtShipdate _
& "#, [Vehicle#]=" & Me.[txtVehicle#] _
& " WHERE rquest_ID=" & Me.cboRequests

CurrentDB.Execute strSQL


Note the delimiters:

Numeric Field: None
Date Field: #DateHere#
Text Field: 'Text Here'

Get back to me/us if there is anything you don't understand.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top