Continuous Forms And SubForm

Loony22

Registered User.
Local time
Today, 18:52
Joined
Nov 30, 2001
Messages
40
In my DB there are Three Tables and three forms based on these tables:

1) Tbpatient (FrmPatient - Single Form)

PatientId
FirstName
LaseName

2)TblPatientRelative (FrmPatientRelative - Continuous Form)

RelativeId
PatientId (One To Many relationship with TblPatient)
RelativeName

2) TblRelativeContact (FrmRelativeContact - Continuous Form - PopUp ?? )

RelativeId (One To Many relationship with TblRelative)
Place
Phone1
Phone2

Since i can't make FrmRelativeContact as SubForm Within FrmPatientRelative, I would like that it will be a pop up Form. The user will press a button that will open up the PopUp Form.

My question is, How do i Synchronize between FrmRelativeContact (PoPUp) AND FrmPatientRelative (Continuous) .

The event i triggerd for the Button :

Private Sub BtnRelativePhone_Click()
DoCmd.OpenForm "frmrelativeContact", acNormal, , "RelativeId = " & Me.RelativeID
End Sub

The Problem is that, whenever i want to add new Contact Information I need to insert the RelativeId manually.

I hope I could have some help.

Ryan,
 
Why can't you make FrmRelativeContact as SubForm Within FrmPatientRelative?
Put the subform in the footer of the main
 
Great Idea. How didn't i think about it.

:)

Thanks Mate.
 
In the BeforeInsert event of the popup, put:

Me.RelativeID = Forms!YourOtherFormName!RelativeID

This will populate the relative id field as soon as the user starts typing in the popup form.
 

Users who are viewing this thread

Back
Top Bottom