Edit and Delete Records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having trouble editing and deleting records. Right now all the database
has a feature where I can add records. I want to edit records by having the
user search by the primary key. Once they find the primary key the rest of
the record pops up and from there they can edit the data. For the delete
feature, I want the user to find the record just like they did for the edit
feature but when the record comes up there is a button that says "Delete
Record". They would click that button to delete the record.
 
If you're in a form presenting the record, go:
in below sequence the code to mybutton control on yr form whereby
ID is the control pointing the ID value in table MyTable...

private mybutton_click()
Dim ssql as string
ssql = "delete from MyTable where MyID" & me.ID
currentdb.execute ssql
end sub

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE
 
Back
Top