PC Review


Reply
Thread Tools Rate Thread

delete record of the table

 
 
fred
Guest
Posts: n/a
 
      3rd Dec 2009
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

 
Reply With Quote
 
 
 
 
Steve Schapel
Guest
Posts: n/a
 
      4th Dec 2009
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?

--
Steve Schapel, Microsoft Access MVP


"fred" <(E-Mail Removed)> wrote in message
news:C7B3E918-DB0E-419B-81FC-(E-Mail Removed)...
> 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
>

 
Reply With Quote
 
fred
Guest
Posts: n/a
 
      4th Dec 2009


"Steve Schapel" wrote:

> 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.
> --
> Steve Schapel, Microsoft Access MVP
>
>
> "fred" <(E-Mail Removed)> wrote in message
> news:C7B3E918-DB0E-419B-81FC-(E-Mail Removed)...
> > 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
> >

> .
>

 
Reply With Quote
 
Daryl S
Guest
Posts: n/a
 
      4th Dec 2009
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


--
Daryl S


"fred" wrote:

>
>
> "Steve Schapel" wrote:
>
> > 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.
> > --
> > Steve Schapel, Microsoft Access MVP
> >
> >
> > "fred" <(E-Mail Removed)> wrote in message
> > news:C7B3E918-DB0E-419B-81FC-(E-Mail Removed)...
> > > 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
> > >

> > .
> >

 
Reply With Quote
 
Steve Schapel
Guest
Posts: n/a
 
      4th Dec 2009
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

--
Steve Schapel, Microsoft Access MVP


"fred" <(E-Mail Removed)> wrote in message
news:EA8A9069-B2FE-4057-9890-(E-Mail Removed)...
>
>
> "Steve Schapel" wrote:
>
>> 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.



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Add / Delete record from table - How to reposition selected record in datagridview??? Cor Ligthert[MVP] Microsoft VB .NET 0 31st Mar 2008 05:26 AM
Delete record if a matching record is present in another table Kiwi_731 Microsoft Access Queries 3 20th Dec 2007 05:45 PM
I need to delete oldest record so that table only contains latest record DarrenNotts Microsoft Access Queries 6 21st Sep 2007 07:55 PM
How to delete a SQL Server record (descending from another record of the same table) with a C# application polocar Microsoft C# .NET 6 23rd Jul 2006 03:20 AM
Upon delete record, conditional delete record from another table =?Utf-8?B?UmljaDEyMzQ=?= Microsoft Access 6 14th Oct 2005 02:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:17 AM.