Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Leading Zeros Required

Status
Not open for further replies.

Secretgeek

Technical User
Jan 3, 2008
80
GB
Maybe this is a question of 'if it ain't broke...' but I currently have a form whose ID box consists of three controls squashed together to appear to the user as one ID code as below:

e.g. 06-0054

I've created is a text box that is producing the right numbers but doesn't keep the leading zeros, so what I ve got at the moment is:

ControlSource: = [StartYear] & " - " & [ID]

Which gives me:

6-54

The source table is formatted with the correct number of zeros. I've tried putting zeroes in the Format Property section but it doesn't seem to make any difference.

Thanks in advance for your help.

 
try

format([startyear],"00") & " - " & format ([id], "0000")

Ian Mayor (UK)
Program Error
Always make your words sweet and nice. Because you never know when you may have to eat them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top