Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / June 2007

Tip: Looking for answers? Try searching our database.

Edit and Delete Records

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chinny03 - 04 Jun 2007 20:58 GMT
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.
Perry - 05 Jun 2007 00:22 GMT
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

>I am having trouble editing and deleting records.  Right now all the
>database
[quoted text clipped - 7 lines]
> feature but when the record comes up there is a button that says "Delete
> Record".  They would click that button to delete the record.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.