Microsoft
Software
Hardware
Network
Question : Concatenate in Query with Leading Zero
Happy New Year!
I have a Acces query to Concatenate two number fields and I keep loosing the leading zeros. heres what I have;
Field1 Field2
MaxYr MaxNum
Value in Field 1..
10
Value in Field 2..
001
..I would like the desired concatenated result to be..
10-001
..but I keep getting..
10-1 (I keep loosing the leading zeros)
Here is my code in the query;
CONTMAX: "M" & [MaxYr] & "-" & [MaxNum]
Can anyone please help me figure this out!? Thanks a very bunch!
Naeem~
Answer : Concatenate in Query with Leading Zero
Try this:
CONTMAX: "M" & Format([MaxYr],"00") & "-" & Format([MaxNum],"000")
mx
Random Solutions
ADO ODBC to Centura SQL DB
Exchange 2007 - Test-SystemHealth (Upgrading servicepack 2)
VBS Script to remove/set folder inheritance
How do I set the marquee text of the Logon Prompt screen saver for Default User?
WSUS sync problem
How to change data arrangement from Raw arrangement into column arrangement
asp.net Why does'nt these required fields work. Only the Phone field works?
Access 2007 Linked to Sharepoint with Drop-downs - type mismatch
Remove first 5 characters from SQL
Combo Box List index