Access Expression

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, all. I'm new to posting, but have been searching the posts regularly to
help me build a database for a VERY small engineering company. They have
been extremely helpful indeed; however, I can't seem to find a way to
automate my job numbers. The format is:

[Year]-[BuilderID]:[BuilderJob#]

where the year is "06", and the builderID and BuilderJob# are both at least
two digits. The expression I have so far does the job, but does not keep the
two-digit formatting that I've set for the last two fields in their
destination tables. Is there any way to tell Access to keep those numbers at
least two-digits long (meaning I can have a BuilderID as "01" instead of
"1")? The expression I have is below:

Expr1: "06" & "-" & [BuilderID] & ":" & [BuilderJob#]

I want the expression to show: 06-01:01 (allowing for 06-115:102, e.g.)
It gives me: 06-1:1

I would greatly appreciate any help with this!! Such a simple problem is
keeping me up at night!! Thank you in advance...
 
Format("111", "00")

Expr1: "06" & "-" & Format([BuilderID], "00") & ":" & Format([BuilderJob#],
"00")
 
Try using the format function to force the display of two digits (or more)

Expr1: "06" & "-" & Format([BuilderID],"#00") & ":" &
Format([BuilderJob#],"#00")
 
Back
Top