koolwaters
Active Member
- Joined
- May 16, 2007
- Messages
- 403
A happy, healthy and prosperous 2011 to everyone.
I need to create a primary key field in my database to display the Current Year, Current Month and then an AutoNumber, eg:
2011011 Doe Jane
2011012 Doe John
2011013 Doe Jill
2011014 Doe Jack
2011011: 2011 (Year) 01 (Month) 1 AutoNumber
I was able to acheive this by creating three columns in the table; Activate Year, Activate Number and AutoID. I set the Activate Year and Month to Integer and the Default Value is set to: =Year(Date())+1 and =Month(Date())+1 respectively. The AutoID is simply an AutoNumber field.
The challange I am now having is with relationships and combo boxes.
Do I need to add all three columns as the foreign key in related tables?
Which column do I bound for a combo box?
Is there another way to acheive the primary keey format I want without using three columns?
Thanks for any assistance.
I need to create a primary key field in my database to display the Current Year, Current Month and then an AutoNumber, eg:
2011011 Doe Jane
2011012 Doe John
2011013 Doe Jill
2011014 Doe Jack
2011011: 2011 (Year) 01 (Month) 1 AutoNumber
I was able to acheive this by creating three columns in the table; Activate Year, Activate Number and AutoID. I set the Activate Year and Month to Integer and the Default Value is set to: =Year(Date())+1 and =Month(Date())+1 respectively. The AutoID is simply an AutoNumber field.
The challange I am now having is with relationships and combo boxes.
Do I need to add all three columns as the foreign key in related tables?
Which column do I bound for a combo box?
Is there another way to acheive the primary keey format I want without using three columns?
Thanks for any assistance.