Leading Zeros in a Bound Textbox

ChrisCione

Registered User.
Local time
Today, 16:50
Joined
Sep 11, 2008
Messages
17
Not sure I'm using the right terminology, but I hope this makes sense:

I have a text box that is bound to a combo box, such that the selection in the combo box (text) auto-populates the textbox (numbers). The textbox is used to display 5 digit numbers, some (but not all) with leading zeros.

I formatted the table that serves as the Control source to display the leading zeros - and it worked (the leading zeros show in the table). However, I can't get the leading zeros to display in the form.

I found this thread -

http://www.access-programmers.co.uk/forums/showthread.php?t=133988&highlight=leading+zeros

and have tried what's suggested, but no dice.

Thanks in advance for any help given.
 
You'll need to use similar formatting in the form control to display the leading zeros.
 
Format the textbox as text.
Number format automatically supresses leading zeros
 
You'll need to use similar formatting in the form control to display the leading zeros.

I've tried setting the formatting for the textbox. I've used

Like "00000"
Like "?????"

and every permutation of the above that I can think of. Still not displaying leading zeros.

I'm not sure if this information is needed, but the control source for the textbox is

=ClassCombo.column(1)

Works perfectly, except for the leading zero issue.
 
I know how to set the field type in a table - have no idea how to set a textbox as text.

Set the textbox ControlSource as:
=Format(ClassCombo.Column(1),"00000")

This makes it text with five digits.
 

Users who are viewing this thread

Back
Top Bottom