Coding for a delete query when applying a filter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want some code that will delete data from a table after a filter has been
applied.

The filter would need to pick up the first two characters of a text string
field.

I'd then want to delete any record that contained that matched the filter.

Can anyone help?
 
I Could have gave you a better example of I knew exactly what the filter you
are using
Use the RunSQL to run a delete query and apply the filter

Docmd.SetWarnings False
Docmd.RunSQL "DELETE * FROM TableName WHERE FieldName= '" &
[SomeStringValue] & "'"
Docmd.SetWarnings True
 
Back
Top