Hello,
I have a main form –frmpatients- and a subform-subformuseExams.In the subform I have a textbox –PatientID – and a combobox-Examname.I want when I fill the combo box in the after update event, but only for two values(look the code), to open a form –frmthromvolytika –and find the specified record. The relationship between the 3 forms is the value “PatientID”
I use this code:
Private Sub Examname_AfterUpdate()
If Me.Examname.Value = 111 Then
DoCmd.OpenForm "frmthromvolytika"
End If
If Me.Examname.Value = 110 Then
DoCmd.OpenForm "frmthromvolytika"
End If
End Sub
I tried: DoCmd.OpenForm "frmthromvolytika", "[PatientID] =" & Me![PatientID]
But I receive the message that the database can’ t find the PatientID
Thanks for any answer.
I have a main form –frmpatients- and a subform-subformuseExams.In the subform I have a textbox –PatientID – and a combobox-Examname.I want when I fill the combo box in the after update event, but only for two values(look the code), to open a form –frmthromvolytika –and find the specified record. The relationship between the 3 forms is the value “PatientID”
I use this code:
Private Sub Examname_AfterUpdate()
If Me.Examname.Value = 111 Then
DoCmd.OpenForm "frmthromvolytika"
End If
If Me.Examname.Value = 110 Then
DoCmd.OpenForm "frmthromvolytika"
End If
End Sub
I tried: DoCmd.OpenForm "frmthromvolytika", "[PatientID] =" & Me![PatientID]
But I receive the message that the database can’ t find the PatientID
Thanks for any answer.