Creating Field With combo of autonumber and text

  • Thread starter Thread starter Benjamin
  • Start date Start date
B

Benjamin

Hello,

I'm looking to create a field that has both an autonumber component and a
static text portion. So, instead of having as an ID# the simple autonumber
function of 1,2,3 etc., I want to have it generated to be something like:
CCA0001, CCA0002...CCA0135 etc.

Any ideas? Thanks!
 
If the prefix is ALWAYS the same then use the autonumber like this --
MyID: "CCA" & Right("000" & [AutonumberField], 4)

Bear in mind that an autonumber field may skip a number or more in sequence.
 
Thank you! But where do I put that formula in? And what does the "4" represent?



KARL DEWEY said:
If the prefix is ALWAYS the same then use the autonumber like this --
MyID: "CCA" & Right("000" & [AutonumberField], 4)

Bear in mind that an autonumber field may skip a number or more in sequence.

--
Build a little, test a little.


Benjamin said:
Hello,

I'm looking to create a field that has both an autonumber component and a
static text portion. So, instead of having as an ID# the simple autonumber
function of 1,2,3 etc., I want to have it generated to be something like:
CCA0001, CCA0002...CCA0135 etc.

Any ideas? Thanks!
 
where do I put that formula
In the queries that feed your forms or reports.
Numbers do not have leading zeros. This adds zeros but because the number
of digits is unknown the process takes the right 4 characters after putting
zeros in front of the number.

--
Build a little, test a little.


Benjamin said:
Thank you! But where do I put that formula in? And what does the "4" represent?



KARL DEWEY said:
If the prefix is ALWAYS the same then use the autonumber like this --
MyID: "CCA" & Right("000" & [AutonumberField], 4)

Bear in mind that an autonumber field may skip a number or more in sequence.

--
Build a little, test a little.


Benjamin said:
Hello,

I'm looking to create a field that has both an autonumber component and a
static text portion. So, instead of having as an ID# the simple autonumber
function of 1,2,3 etc., I want to have it generated to be something like:
CCA0001, CCA0002...CCA0135 etc.

Any ideas? Thanks!
 
Back
Top