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

update table via combo box (using sql)

Status
Not open for further replies.
Sep 16, 2004
21
0
0
GB
i need to update a field within a table with the results displayed in the combo box.
all the fields in that particular table are to be updated with the combo box results

thanks
 
Hi

I am assuming you mean all the rows need to be updated

In the after update eevnt of the combo

Dim strSQL as String

strSQL = "UPDATE YourTableName SET YouColumnName = " & cboName & ";"
DoCmd.RunSQL strSQL

Note if it is couln is a string

you need

strSQL = "UPDATE YourTableName SET YouColumnName = '" & cboName & "';"



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top