delete record of the table

F

fred

I need know how delete one record of one table in Access through a comand,i
have to do for Visual Basic,that is to say, put the code, I need help
 
S

Steve Schapel

Fred,

I think the key questions here are:
- *when* do you wnat to delete this record?
- how do we identify which record is to be deleted?
 
F

fred

Steve Schapel said:
Fred,

I think the key questions here are:
- *when* do you wnat to delete this record?
- how do we identify which record is to be deleted?

this is ok, but I need know the code for put en Visual Basic, for that the
comand "delete", work. Example, I want delete the name the one person through
of the comand delete in the form.
 
D

Daryl S

Fred -

Look up the RunSQL command in Visual Basic Help (not Access Help). Here is
the basic idea:

Dim SQL As String

SQL = "<SQL Statement Goes Here>"

DoCmd.RunSQL SQL
 
S

Steve Schapel

Fred,

Well, the focus of this forum is on Macros in Access, which is not VBA. But
anyway, the VBA code you need is:

DoCmd.RunCommand acCmdDeleteRecord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top