Suppress "0" in numeric text box

D

Dennis

Hi,

I'm using Access via XP Office Pro on Windows 7.

I have a text box control that enables me to enter my check number. The
check number is a numeric field on the table. There is no default value in
this control.

However, when the form is displayed, there is a zero "0" in the check number
field on the form. Is there a way to stop the zero from displaying on the
form. If there is no check number (as some items are paid by credit card
number) I would like the check number field blank.

Thanks,

Dennis
 
J

John W. Vinson

Hi,

I'm using Access via XP Office Pro on Windows 7.

I have a text box control that enables me to enter my check number. The
check number is a numeric field on the table. There is no default value in
this control.

However, when the form is displayed, there is a zero "0" in the check number
field on the form. Is there a way to stop the zero from displaying on the
form. If there is no check number (as some items are paid by credit card
number) I would like the check number field blank.

My guess is that there is no default value in the control... but that there IS
a default zero in the Table field. Microsoft made the (unwise) decision that
all numeric fields should have a zero default by default; in this case that's
inappropriate.

Open the Table in design view, select this field, and remove the 0 from the
Default Value property (in the field properties on the lower left of the
screen).
 
F

fredg

Hi,

I'm using Access via XP Office Pro on Windows 7.

I have a text box control that enables me to enter my check number. The
check number is a numeric field on the table. There is no default value in
this control.

However, when the form is displayed, there is a zero "0" in the check number
field on the form. Is there a way to stop the zero from displaying on the
form. If there is no check number (as some items are paid by credit card
number) I would like the check number field blank.

Thanks,

Dennis


Either the Table field's Default Value or the Form control's Default
Value is set to 0.
 
K

KARL DEWEY

Open the table in design view, change default to blank, and allow nulls.

Backup database. Run update to null any record with value = 0.
 

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

Top