Concatenate

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

Guest

I have a autonumber formated like 000001 and I'm concatenating it with a 4
alpha text field so I end up with something like TEST000001.

I've created a calculated field in the forms record source with the
following: -
SalesLedgerCode: [strSalesLedgerShortcode] & [lngSalesLedgerCodeID]

The result is TEST1 instead of TEST000001. The field in the table is
formated as 000000.

Could some please help out.
Thanks
Glenn
 
I have a autonumber formated like 000001 and I'm concatenating it with a 4
alpha text field so I end up with something like TEST000001.

I've created a calculated field in the forms record source with the
following: -
SalesLedgerCode: [strSalesLedgerShortcode] & [lngSalesLedgerCodeID]

The result is TEST1 instead of TEST000001. The field in the table is
formated as 000000.

Could some please help out.
Thanks
Glenn

A Number datatype value is never saved with leading zero's. A value of
000004 is the same value as 4.
A Field's format is just how it displays the field, not how the data
is actually stored.
Use:
SalesLedgerCode: [strSalesLedgerShortcode] &
Format([lngSalesLedgerCodeID],"000000")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Auto Number 3
Keep Leading Zeros in Concatenation 5
Concatenate hierarchy 1
Concatenate Many Side of 1:Many Relationship 2
Concatenation 2
concatenating problem 2
DLookUp syntax 9
Rich Text Format 0

Back
Top