R
ra.john
Hi.
I have a table, which has an autonumber as its primary key.
Secondly, I have a field which is called AssetPlantID -
this holds the unique Plant ID for each record stored, the ID is based
apon the department code which is stored in the department table, and
then a number, 1,2,3 etc
in the table I have many records, i would like to increment this
AssetPlant ID automaticly for each new asset added to the database -
getting the DepartmentCode to appear before the ID is fine, its
querying the previous IDs to find the last is the problem
I am aware of the Dmax function, but this is no use with the Id having
letters before the numbers
for example
A1, A2, A3, A4, B1, B2, B3 etc are all AssetPLant IDs
How would I find the last number which is prefixed with an A with a
query?
I have a table, which has an autonumber as its primary key.
Secondly, I have a field which is called AssetPlantID -
this holds the unique Plant ID for each record stored, the ID is based
apon the department code which is stored in the department table, and
then a number, 1,2,3 etc
in the table I have many records, i would like to increment this
AssetPlant ID automaticly for each new asset added to the database -
getting the DepartmentCode to appear before the ID is fine, its
querying the previous IDs to find the last is the problem
I am aware of the Dmax function, but this is no use with the Id having
letters before the numbers
for example
A1, A2, A3, A4, B1, B2, B3 etc are all AssetPLant IDs
How would I find the last number which is prefixed with an A with a
query?