N
Nick Mirro
Need a little coding assistance. I have 2 forms that now subforms to
display visits. The primary forms contain a patient list based on PatientID
The subforms both manage visits and are based on VisitID. Prior, all
patients and all visits were scrolled in forms without subforms.
How can I jump to another form and have it open to the same patient on the
main form, and the same subform Visit record?
Nick
(Here is the code used to jump forms when all patients and all visits were
in both form's recordsets)
Private Sub CommLog_Click()
On Error GoTo Err_CommLog_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCollections"
DoCmd.RunCommand acCmdSaveRecord
stLinkCriteria = "[VisitID]=" & Me![VisitID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_CommLog_Click:
Exit Sub
Err_CommLog_Click:
MsgBox Err.Description
Resume Exit_CommLog_Click
End Sub
display visits. The primary forms contain a patient list based on PatientID
The subforms both manage visits and are based on VisitID. Prior, all
patients and all visits were scrolled in forms without subforms.
How can I jump to another form and have it open to the same patient on the
main form, and the same subform Visit record?
Nick
(Here is the code used to jump forms when all patients and all visits were
in both form's recordsets)
Private Sub CommLog_Click()
On Error GoTo Err_CommLog_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCollections"
DoCmd.RunCommand acCmdSaveRecord
stLinkCriteria = "[VisitID]=" & Me![VisitID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_CommLog_Click:
Exit Sub
Err_CommLog_Click:
MsgBox Err.Description
Resume Exit_CommLog_Click
End Sub