Delete contents of a text box!

  • Thread starter Thread starter Bob Vance
  • Start date Start date
B

Bob Vance

This code is not trigering my ckbBachInvoice, instead of ="" I need the
code to delete contents of tbEmail...........Thanks Bob V

Private Sub cmdDeleteEmail_Click()
tbEmail.value = ""
Me.ckbBachInvoice = 0
Me.Refresh
End Sub
 
Try setting the value to Null instead of a zero-length string:
Me.txtEmail = Null

Then save the change:
Me.Dirty = False
 
Thanks Allen , works fine without using the Me.Dirty do I need it and if I
do where do i place that code ....Thanks Bob V
 
Yes you should use it or else it might not be saved when the form is closed
under certain circumstances
--
Pete Blackburn - words to live by:
"Don''t ever let somebody tell you. You can''t do something.You got a
dream,You gotta protect it." Edited Quote from the Pursuit Of Happiness
 
Depends if you want the record to be saved at this point, or whether there
could be more changes to be made before you save the record.

If you want to force the record save, it will be after other changes you
make, (e.g. instead of the Me.Refresh line.)
 

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