Link to home
Start Free TrialLog in
Avatar of Samoin
Samoin

asked on

Autonumber Format

Hi Experts,

I'm having a table that has a primary field as auto number. I want to add year to this field and have it reset after each year. Can anybody help me with this please?
 
Currently it's format as 0"8-"000 but I want it to be using a datetime field called DateofService and use the year mentioned there and create/append the autonumber

For example: DateOfService: 05/01/2007 then GC # 07-001 and if there are other records for that year it should increment it sequentially. If the year changes it should reset and start with the same (05/01/2008 08-001).

Thanks

Table name: TBL_BCInformation
Fields: GC # (primary key) autonumber
           DateofService Datetime

Open in new window

Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

You cannot format an Autonumber field. You can create sequential numbers for each year, but you cannot do this at the table level. You must do it through your forms.

Do you have multiple users in this database? If you do, the task is much more involved.
Avatar of Samoin
Samoin

ASKER

Hi LSMConsulting,

Can you show how I can create a custom sequential number that can be used as primary key? Yes I do have multiple users in this database.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial