serious autonumbering problem

saleemMSMS

Registered User.
Local time
Tomorrow, 05:46
Joined
Aug 12, 2009
Messages
92
i have 2 tables
training program and session

Training Program
============
program ID
description
duratuion
#ofSessions

Sessions
============
programID
SessionID
sessionDate
#Participants

here, in the training program table, the program ID is an AutoNumber Column.

in the session table, programID and sressionID are composite primary keys.
the sessionID starts from 1 and increments for a given program ID
for eg :

2z55ax2.png


at the moment, the session ID is entered manually, my question is, isnt there a way that the session ID can be entered automatically ?
 
Last edited:
Please refrain from Double Posting

Looks like the other post got deleted, so this one is now live.


saleemMSMS -

Your Sessions table should have SessionID as the autonumber and the ProgramID should be a Long Integer to store the Foreign Key (ProgramID from the Training Program table).

Also, you should not use special characters, like #, or spaces in the field or object names. # has special meaning in Access (having to do with dates) and it will make your life MUCH, MUCH easier if you do not use them in field names.
 

Users who are viewing this thread

Back
Top Bottom