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.
 

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

Back
Top