Hi , i know this will be really easy for someone here, but im struggling to get this working.
I have parent form (frmRIASelectApplication) and sub form (sfrmRIASelectApplication) . The subform is a datasheet. I am creating a dblclick event on the Control StandardLetterID of the subform.
I need to open Parent form frmRIAProcess where its subform frmRIAApprovalRequest is equal to the subform sfrmRIASelectApplication.
This is the code im trying, but it just opens on a new record each time:
Can anyone please tell me where im going wrong. I've tried using the whole whole path instead of Me (Forms![frmRIAProcess]![frmRIAApprovalRequest].Form![StandardLetterID] but this did not work either.
Many Thanks
Kev
I have parent form (frmRIASelectApplication) and sub form (sfrmRIASelectApplication) . The subform is a datasheet. I am creating a dblclick event on the Control StandardLetterID of the subform.
I need to open Parent form frmRIAProcess where its subform frmRIAApprovalRequest is equal to the subform sfrmRIASelectApplication.
This is the code im trying, but it just opens on a new record each time:
Code:
Private Sub StandardLetterID_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmRIAProcess"
stLinkCriteria = "Forms![frmRIAProcess]![frmRIAApprovalRequest].Form![StandardLetterID]=" & Me![StandardLetterID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "frmRIASelectApplication", acSaveYes
End Sub
Can anyone please tell me where im going wrong. I've tried using the whole whole path instead of Me (Forms![frmRIAProcess]![frmRIAApprovalRequest].Form![StandardLetterID] but this did not work either.
Many Thanks
Kev