P
Pat Dools
Hello,
I have a database with a Switchboard that has a 'Subject' drop-down list.
Once you pick a Subject, you can navigate either to the 'Subject_Info' (one
record per Subject) form or to the 'Subject_Attendance' form (one or more
records per Subject) via a Command button utlizing the 'DoCmd.OpenForm...'
function. If you have associated 'Attendance' records, then you will be
brought to them based on the Subject you chose on the Switchboard. If there
are no associated 'Attendance' records, I would like a 'Yes/No' message box
to pop up to say, 'This Subject has no Attendance Records. Would you like to
enter a new record?'. This way the user knows that they are on a new record
and then can choose whether or not to create that new record.
My guess is that I have to evaluate the 'SubjectID' associated w/ the name
in the drop-down box on the Switchboard and then look at the 'SubjectID'
field in the 'Attendance' table and see if there are any matching records.
What would the code be that I would put behind the 'Attendance' button on the
Switchboard to accomplish this?
Thank you.
I have a database with a Switchboard that has a 'Subject' drop-down list.
Once you pick a Subject, you can navigate either to the 'Subject_Info' (one
record per Subject) form or to the 'Subject_Attendance' form (one or more
records per Subject) via a Command button utlizing the 'DoCmd.OpenForm...'
function. If you have associated 'Attendance' records, then you will be
brought to them based on the Subject you chose on the Switchboard. If there
are no associated 'Attendance' records, I would like a 'Yes/No' message box
to pop up to say, 'This Subject has no Attendance Records. Would you like to
enter a new record?'. This way the user knows that they are on a new record
and then can choose whether or not to create that new record.
My guess is that I have to evaluate the 'SubjectID' associated w/ the name
in the drop-down box on the Switchboard and then look at the 'SubjectID'
field in the 'Attendance' table and see if there are any matching records.
What would the code be that I would put behind the 'Attendance' button on the
Switchboard to accomplish this?
Thank you.