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

Find record withsame number, then edit the record in table.

Status
Not open for further replies.

CTOROCK

Programmer
May 14, 2002
289
US
In Access 200, I have a combo box that is pulling it's values from a table. On Update, I would like to edit the record that is selected. For example, When I choose the value from the combo box say, "224" then I would like it to open the bound table, go the the record that has the ID = "224", and edit a field on that record. Ive tried :

dim rst as recordset
dim db as database
dim StrId as string
StrId = txtId.value
db = currentdb
set rst = db.opentable("Tbl_shcedule",,"Opendynaset")
rst.findfirst "ID = strID"
rst.edit
rst.fields("cartons").value = 123
rst.update
rst.close

find first doesn't work, any help appreciated thanks! "The greatest risk, is not taking one."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top