Delete data in field

  • Thread starter Thread starter Svein Ludvigsen
  • Start date Start date
S

Svein Ludvigsen

I want to delete all data in a field with a command button.
What code must i write?

Svein
 
CurrentDb.Execute "UPDATE YourTableNameHere SET YourFieldNameHere = Null",
dbFailOnError

This will set the content of the specified field in all records to Null,
without any further prompting, so be sure you *really* want to do that
before executing this code. As always when performing any kind of bulk
update to data, it would be wise to make a back-up first.
 
Back
Top