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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forcing Numbers

Status
Not open for further replies.

Dineedshelp

Technical User
Sep 27, 2002
44
GB
I have four tables, location, department, Product and Asset. All these have unique ID numbers. I want to format the ID numbers on a form so that they appear as three numbers ie, for department 1, I want the number to appear as 001, same for the other tables.

I then want to take all four ID numbers from the above tables and combine them to make one longer number ie:

Location = 001
Department = 003
Supplier = 056
Asset = 199

Will make 001-003-056-199

How can I do this?

Please help!!!!

[nosmiley]
 
You concatenate using the & operator. Hence you need...

[Location] & "-" & [Department] & "-" etc....

Craig
 
Try this:

=format([Location],"000") & "-" & format([Department],"000") & "-" & Format([Supplier],"000") & "-" & Format([Asset],"000")
 
Parax

Love ya!!!! (Well not literally!!!)

Thank you!!!!

Di
 
i like this but where is the code attached tO?

Im verY slow on this sort of stuff!1

MAl
 
In the control source of the properties box, use the expression builder and add the code
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top