G
Guest
MS Access 2K, Windows XP
====================
Hi,
I have separate forms to enter data for the following entities: Meeting,
Agenda and Decisions.
Relationship
------------
[Meeting] (1) ----> (many) [Agenda] and
[Agenda] (1) ----> (many) [Decisions].
MeetingID (PK in tblMeeting) is a FK in tblAgenda.
AgendaID (PK in tblAgenda) is a FK in tblDecision (which has DecisionID as
PK).
I have one form to enter Meeting information (frmMeeting), and a button on
that form opens frmAgenda to enter new Agenda items for that meeting. I'm
passing the MeetingID in the OpenArgs to frmAgenda.
Right now, the user has to close frmAgenda and click on the button on
frmMeeting to add the next new Agenda item. I'd like to add a button on
frmAgenda to add a new Agenda item, thus minimizing the steps for this action.
I'd like to get some feedback if this solution is error-free. It SEEMS to be
working fine, both with the button and the Record Navigation button for the
new record on frmAgenda.
This code is in OnCurrent event of frmAgenda
===================================================
If Me.NewRecord Then
If CurrentProject.AllForms("frmMeeting").IsLoaded Then
Me.MeetingID = [Forms]![frmMeeting]![MeetingID]
End If
End If
===================================================
The form frmMeeting remains open while frmAgenda is open.
Q1. Am I approaching this the right way, and am I missing anything?
Q2. Do I still need to pass MeetingID in OpenArgs to frmAgenda if this code
is correct?
Thanks for your response.
-Amit
====================
Hi,
I have separate forms to enter data for the following entities: Meeting,
Agenda and Decisions.
Relationship
------------
[Meeting] (1) ----> (many) [Agenda] and
[Agenda] (1) ----> (many) [Decisions].
MeetingID (PK in tblMeeting) is a FK in tblAgenda.
AgendaID (PK in tblAgenda) is a FK in tblDecision (which has DecisionID as
PK).
I have one form to enter Meeting information (frmMeeting), and a button on
that form opens frmAgenda to enter new Agenda items for that meeting. I'm
passing the MeetingID in the OpenArgs to frmAgenda.
Right now, the user has to close frmAgenda and click on the button on
frmMeeting to add the next new Agenda item. I'd like to add a button on
frmAgenda to add a new Agenda item, thus minimizing the steps for this action.
I'd like to get some feedback if this solution is error-free. It SEEMS to be
working fine, both with the button and the Record Navigation button for the
new record on frmAgenda.
This code is in OnCurrent event of frmAgenda
===================================================
If Me.NewRecord Then
If CurrentProject.AllForms("frmMeeting").IsLoaded Then
Me.MeetingID = [Forms]![frmMeeting]![MeetingID]
End If
End If
===================================================
The form frmMeeting remains open while frmAgenda is open.
Q1. Am I approaching this the right way, and am I missing anything?
Q2. Do I still need to pass MeetingID in OpenArgs to frmAgenda if this code
is correct?
Thanks for your response.
-Amit