Full Version: Undo or clear infomamtion
UtterAccess Discussion Forums > Microsoft® Access > Access Q and A
sandrao
I have a small form that I use to create a report every month. Some of the information in those field carries on every month but other fields change each month. How can I have just certain field cleared of the information without deleating the entire record? Can a query update a field with an "Null" value. Or can this be done through VB? I just want the clear informatin in certain fields of a record and keep others.

Sandrao
strive4peace
Hi Sandaro,

"How can I have just certain field cleared of the information without deleating the entire record?"

you could put a "Reset" button on your form...

CODE
   me.controlname1 = null
   me.controlname2 = null
   'etc


"Can a query update a field with an "Null" value."

yes

UPDATE Tablename SET FieldName1 = Null, Fieldname2 = Null

"Or can this be done through VB?"

yes, but if you are in the code behind the form, it may be best to just set the controls to Null
StephKai
Hi Crystal--

Found your post searching UA, and you gave exactly the info I needed to create a search form "Reset" or "Clear" button on my project, thanks!

--Steph
strive4peace
you're welcome, Steph wink.gif happy to help
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.