Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing a value in a field to null 2

Status
Not open for further replies.

bstlouis

Technical User
Sep 23, 2004
3
US
I have a form that allows the user to enter data into it to update a database. If the user selects the wrong record, I would like to be able to correct the error by inserting null values in their place. For example, the user selects a record and enters the date some material was received, then save the date by updating the record. Later it is discovered that the wrong record was updated. I want to blank out the date of the original error. I'm using the cdate function to update the database, but I don't know how to store a null value in its place. I'm a relative newbie and appreciate any help I can get. Thanks and Regards!
 
First the Database field has to accept null's. Then just do an update to the field or just delete the field where unique id = your id you pass in.

Ordinary Programmer
 
You can use NULL as a value in a SQL statement '...SET field1 = NULL...'

or, are you working right in the database? If it's SQL Server, you can keystroke CTRL-0 in the field in Enterprise Manager to restore the field to NULL. I don't know if Access has an equivalent.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top