How to show a zero on a form textbox field?

BadBoy House

Registered User.
Local time
Today, 22:31
Joined
Oct 8, 2009
Messages
54
Hi all,

Could anyone tell me how to make a text-box field on a form display a zero?

We have a form linked to a table on our jobs database and I need the ProposedFinalBillAmount field on the form to display a zero.

The field on the table displays 0.00 which is fine, however the form clears a zero if you type one in:



Sometimes the bill amount will be zero so we need to display this in the text box.

Thanks in advance.
 
Check the format property of the control?
 
What's the Format property of the textbox?
 
as Gasman said it.
on design view of your form, select the textbox.
on its Property->Format->Format, you can put:

;;0;0
 
The field on the table displays 0.00 which is fine, however the form clears a zero if you type one in:
The form shouldn't "clear" a zero (0) as a default behavior. So, either the format property has something to do with it or you may have some code running that clears it.
 
By chance you are hitting enter and wrapping the 0 entered on to a new line?
To facilitate zero the textbox default value property could be set to zero or zero could be the default value in the table field, assuming it's numeric.
 
The format property of the textbox on the form is currently #;-#;"";"".

If I change it to ;;0;0 it causes strange behaviour when clicking in the text box.

I tried changing the format to General Number but this then omits the decimal places.

I then set the format property to Standard (don't know why I didn't try this before) and it seems to have sorted it.

Many thanks!
 
The format property of the textbox on the form is currently #;-#;"";"".

If I change it to ;;0;0 it causes strange behaviour when clicking in the text box.

I tried changing the format to General Number but this then omits the decimal places.

I then set the format property to Standard (don't know why I didn't try this before) and it seems to have sorted it.

Many thanks!
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom