Currency/ Number fields

  • Thread starter Thread starter Very New to Access
  • Start date Start date
V

Very New to Access

Does anyone no of a way that when I create a number or currency field in a
table that the corresponding field on my form is blank and not with a "Zero"
in it. For example, when I open up the form that I have created for the
table, every field that is either currency or number has a zero already put
into the field. I would like to eliminate that and just have a blank field
when I open up the form. Is that possible? Thank you so much in advance.

Newbee
 
Hi,

Simple way to do this is to format the text box as follows :

0;(0)[Red];"";"Null "[Red]

If there is an entry of 0 - this will be hidden. Where there is no entry,
the text will show "Null" in Red (usefull for some applications) - modify
that bit if you do not need it. Else it will show just the number - set the
format as you like.

Hope this helps

Tim
 
Thank you so much for your reply. So if I just wanted to hide the zero what
would I type in and where would I type it in? Sorry, realize this must be a
very simple problem but I am unable to find it in my "Access for Dummies"
book. Thank you again.

Newbee
TimS said:
Hi,

Simple way to do this is to format the text box as follows :

0;(0)[Red];"";"Null "[Red]

If there is an entry of 0 - this will be hidden. Where there is no entry,
the text will show "Null" in Red (usefull for some applications) - modify
that bit if you do not need it. Else it will show just the number - set the
format as you like.

Hope this helps

Tim


Very New to Access said:
Does anyone no of a way that when I create a number or currency field in a
table that the corresponding field on my form is blank and not with a "Zero"
in it. For example, when I open up the form that I have created for the
table, every field that is either currency or number has a zero already put
into the field. I would like to eliminate that and just have a blank field
when I open up the form. Is that possible? Thank you so much in advance.

Newbee
 
Thank you so much for your reply. So if I just wanted to hide the zero what
would I type in and where would I type it in? Sorry, realize this must be a
very simple problem but I am unable to find it in my "Access for Dummies"
book. Thank you again.

Newbee
TimS said:
Hi,

Simple way to do this is to format the text box as follows :

0;(0)[Red];"";"Null "[Red]

If there is an entry of 0 - this will be hidden. Where there is no entry,
the text will show "Null" in Red (usefull for some applications) - modify
that bit if you do not need it. Else it will show just the number - set the
format as you like.

Hope this helps

Tim


Very New to Access said:
Does anyone no of a way that when I create a number or currency field in a
table that the corresponding field on my form is blank and not with a "Zero"
in it. For example, when I open up the form that I have created for the
table, every field that is either currency or number has a zero already put
into the field. I would like to eliminate that and just have a blank field
when I open up the form. Is that possible? Thank you so much in advance.

Newbee

Perhaps instead of Access for Dummies you should try access Help.

Place the cursor on the Format Property line.
Press F1.
Select Number and Currency datatype
Read!
Then experiment with the examples shown in Setting.
 
Does anyone no of a way that when I create a number or currency field in a
table that the corresponding field on my form is blank and not with a "Zero"
in it.

Open the Table in design view; select each such field. Look at the
bottom left of the screen for the field's properties - one of them is
the "Default" property. Access has a "default default" of 0 for Number
or Currency fields, a design decision which I intensely dislike <g>.

Simply erase the 0 and new records will go in with Null (undefined, no
value) instead.

John W. Vinson[MVP]
 
Best to check Access Help looking for "format property" --- you'll see that
this property can consist of 4 sections separated by semi-colons defining
how the field will look in any of 4 states: positive, negative, zero and
null. If youo want something special to display on a zero value, then you
would code that mask in the third section. Youo can specify that a blank
will result, or that a character string will result (such as the word "zero"
or such), etc. The example in the help screen is:

$#,##0.00[Green];($#,##0.00)[Red];"Zero";"Null"

which would display currency in green for a positive number, burrency with
parentheses in red for a negative number, the word "Zero" for a zero value,
and the word "Null" for a null value.

Hope this helps...

Bob
 
Back
Top