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

  • Thread starter Thread starter JOJ via AccessMonster.com
  • Start date 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
 
Joe,

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