Question Locked

how to generate Autonumber with Date together in Access 2002

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a field call PIR No, in this field I want a Date and a autonumber appear in this field....thanks.

4 replies

by Former member

Thanks to Wayne for this formula.

SELECT Format([TableName]![DateField],"yy") &
IIf(Len([TableName]![AutoNumberField])=1,"00",IIf(Len([TableName]![AutoNumberField])=2,"0")) & [TableName]![AutoNumberField] AS NewName
FROM TableName;

This will work up to record 999 (after that you will have to alter the
formula - but quite simple)

Note that this is a text string not a number so you will need to add the
other columns to the query to be able to sort it.

Please post back if you have more problems or questions.

by cpangwah

thanks for your formula, sorry i am new to access. Can u help where do i put tat formula in? can u provide step by steps...many thanks!!

by cpangwah

I want to output my Access Form data into Microsoft Word and auto save into C drive with a click of a Command button. Can u provide the steps...many thanks!

This discussion is closed to new replies.