Nulls

  • Thread starter Thread starter vbnetman via AccessMonster.com
  • Start date Start date
V

vbnetman via AccessMonster.com

Good evening,
I've got a form with a yes / no dialog box that is used to accept / reject
data changes. When the user decides "NO", I want to close the form and exit
(docmd.close). At the time the user makes this selection, 2 text boxes
representing 2 fields are populated by design. I want to empty those just
prior to closing. I've used textbox1 = "" and textbox2 = "" (empty strings).
Access views this as a null and will not accept it. I can hide the warnings
but this does not really solve the problem. I've also tried textbox1 = 0 and
textbox 2 = 0 but these are actually values. Has anyone encountered this and,
if so, how did you resolve it.
Thank you
 
Check the Properties "Required" and "AllowedZeroLength" of the Fields in the
Table DesignView.

These 2 Properties works together to allow different values in the Field,
e.g. Null, empty String, nomal value ... so you need to check Access Help to
find the right combination for you.
 
Thank you for the tips!
Using the Escape (ESC) key, or in code:

Me.Undo

will return the form to its original, unsaved data. (assuming that you don't
have a subform on it, and have already saved the mainform data by moving to
the subform.)
Good evening,
I've got a form with a yes / no dialog box that is used to accept /
[quoted text clipped - 13 lines]
if so, how did you resolve it.
Thank you
 

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