===>Delete record(s)/record set based on a criteria

  • Thread starter JOJ via AccessMonster.com
  • Start date
J

JOJ via AccessMonster.com

Hello

Following is my recordset.I want to flag few record with "0" and to
delete those "0" flagged records.

Could someone write a module for this.I am stuck up...!!


Date hit Part number Supplier Qty Flag

19-10-05 A Y 15
0
20-10-05 A Y 15
0
21-10-05 A Y 15
0

19-10-05 X Z 10
20-10-05 X Z 10
21-10-05 X Z 10
22-10-05 X Z 10

22-10-05 X Z 10
0
22-10-05 X Z 10
0
22-10-05 X Z 10
0

Crieria is as under:
The first case current date entry is note there hence complete
recordset to be deleted.
Second case current date entry is there hence record set note to be deleted
only duplicate record to be deleted.


Thanks Indeed,
Joe
 
S

Steve Schapel

Joe,

I am not sure if this is all you want , but...
CurrrentDb.Execute "DELETE * FROM YourTable WHERE Flag=0"
 

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