Trim format question?

A

a24t42

I have a simple format question.

I have a field called -
ID - custom counter, long number, needs to be 4 characters. I have set
format to 0000. I use DLookup to find this number.

I want to display the number with "SREG" in front of it. I have tried

Control Source: ="SREG" &
DLookUp("[NextAvailableCounter]","CounterTable")

when I do this the number gets trimmed. Say the next number is 0362. I
get SREG362. I want SREG0362. Is there a way to make sure that number
is not trimmed.

Hope that makes sense. Any hekp would be apprecieted.
 
K

Ken Sheridan

Use the following expression:

="SREG" &
Format(Nz(DLookUp("[NextAvailableCounter]","CounterTable"),1),"0000")

Ken Sheridan
Stafford, England
 
A

a24t42

Use the following expression:
Thank you Ken. That worked perfectly.

Judy


="SREG" &
Format(Nz(DLookUp("[NextAvailableCounter]","CounterTable"),1),"0000")

Ken Sheridan
Stafford, England

I have a simple format question.
I have a field called -
ID - custom counter, long number, needs to be 4 characters. I have set
format to 0000. I use DLookup to find this number.
I want to display the number with "SREG" in front of it. I have tried
Control Source: ="SREG" &
DLookUp("[NextAvailableCounter]","CounterTable")
when I do this the number gets trimmed. Say the next number is 0362. I
get SREG362. I want SREG0362. Is there a way to make sure that number
is not trimmed.
Hope that makes sense. Any hekp would be apprecieted.
 

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

Top