R
rwilliams
Hi. I am using Access 2002.
I have a form with an embedded subform. When a user 2x clicks on "ATLAS Ref"
in the subform it opens the Experiment Details form. My problem is that
"ATLAS Ref" may contain data from several batches and I would like to see
only the relevant batch when the field is 2x clicked. I've tried to adjust
the stLinkCriteria to include the "Batch No" however Access tells me it can't
find the Batch No. I think that is because Batch No is on the form, not the
subform. Is there a way to modify the code below so that the criteria
specifies the Batch No contained on the form?
TIA
Private Sub ATLAS_Ref_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Experiment Details"
stLinkCriteria = "[ATLAS Ref]='" & Me![ATLAS Ref] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
I have a form with an embedded subform. When a user 2x clicks on "ATLAS Ref"
in the subform it opens the Experiment Details form. My problem is that
"ATLAS Ref" may contain data from several batches and I would like to see
only the relevant batch when the field is 2x clicked. I've tried to adjust
the stLinkCriteria to include the "Batch No" however Access tells me it can't
find the Batch No. I think that is because Batch No is on the form, not the
subform. Is there a way to modify the code below so that the criteria
specifies the Batch No contained on the form?
TIA
Private Sub ATLAS_Ref_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Experiment Details"
stLinkCriteria = "[ATLAS Ref]='" & Me![ATLAS Ref] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub