Clear out a value in a field

  • Thread starter Thread starter Tamer
  • Start date Start date
T

Tamer

I have a text box in an Access 2000 form. I added a cmd
button to the form to add a new record. I noticed that the
text box shows the number 0 after I add a new record
(because it holds an integer data type). Is there any way
to get rid of this 0?? I tried to use "Me![txt_MyInt].
clear", but it is not working. Any idea??

Thanks in advance
 
You probably have 0 defined as a default in the table (go
to design mode for the table and look to see whether you
have a default value defined for the field), or a default
value has been assigned to the control (look on the "Data"
tab under the properties for the control to see whether a
default value has been defined). Hope this works.

John
 
Thanks. It works
-----Original Message-----
You probably have 0 defined as a default in the table (go
to design mode for the table and look to see whether you
have a default value defined for the field), or a default
value has been assigned to the control (look on the "Data"
tab under the properties for the control to see whether a
default value has been defined). Hope this works.

John


-----Original Message-----
I have a text box in an Access 2000 form. I added a cmd
button to the form to add a new record. I noticed that the
text box shows the number 0 after I add a new record
(because it holds an integer data type). Is there any way
to get rid of this 0?? I tried to use "Me![txt_MyInt].
clear", but it is not working. Any idea??

Thanks in advance

.
.
 
I have a text box in an Access 2000 form. I added a cmd
button to the form to add a new record. I noticed that the
text box shows the number 0 after I add a new record
(because it holds an integer data type). Is there any way
to get rid of this 0?? I tried to use "Me![txt_MyInt].
clear", but it is not working. Any idea??

Thanks in advance

Open the Table in design view, and replace the 0 in the Default
property of the field with nothing (just backspace over it).

The VBA would be

Me!txt_MyInt = Null
 
Back
Top