Using " " to clear the field (1 Viewer)

aqif

Registered User.
Local time
Today, 10:49
Joined
Jul 9, 2001
Messages
158
Hi All


I've got this unique problem now. Most of the people use " " to clear the text box or field. I've got a text box. I also have a button which clears the box. Problem is that when i use " " for clearing the box. It clears OK but when i try to enter data it leaves one space in the start and I have to press backspace in order to avaoid that.

I also have a date field and when I clear that using " " the eror comes showing voilation of Input Mask as its input mask is set to 99/99/9999.

I also tried using "" but error of "Zero level string not allowed" shows up. Is there any athentic way to clear the text box no matter its of number,date or text type?

Cheers!
Aqif
 

DALeffler

Registered Perpetrator
Local time
Today, 03:49
Joined
Dec 5, 2000
Messages
263
Rather than clearing the txtbox, can you execute a DoCmd.GoToControl "txtYourControlName" statement when the value in the txtbx isn't something your code will swallow?

Let the control clear itself?

HTH,

Doug.
 

Users who are viewing this thread

Top Bottom