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

edit listbox question

Status
Not open for further replies.

ajking

Technical User
Aug 13, 2002
229
I have a database which has a listbox where you can select a name from the list. this name is placed in a text box and what I want to be able to do is: edit the name and replace the corresponding record with the new name i.e. delete the old name and replace it with the new name. I don't want to add it as a new record. TIA

'Life is what happens to you while you are busy making other plans' John W. Lennon 1940-1980
 
It should be possible to run an Update query in code, for example:

Code:
Dim db As DAO.Database
Set db=CurrentDB
strSQL="Update tblNames Set [Name]='" & Me.txtName _
& "' Where ID=" & Me.lstNames
db.Execute strSQL, dbFailOnError
 
Hi Remou
many thanks for superfast reply. I will try it out asap

'Life is what happens to you while you are busy making other plans' John W. Lennon 1940-1980
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top