C
Chris
I have used the code below to open the form 'frm_prod_appr_comments' when the
field is dbl clicked and have it display the contents of the field that was
dbl clicked. I have tried using the wherecondition in the openform command,
but it filters the opened form to just a new record and does not link it to
the record that was active. Can anyone see where I have gone wrong?
Private Sub APPRAISAL_COMMENTS_DblClick(Cancel As Integer)
On Error GoTo Err_open_frm_prod_appr_comments_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim appid As String
Dim appid1 As String
stDocName = "frm_prod_appr_comments"
appid =
"Forms!Range_Form1.product_form1_new_one.PRODUCT_APPRAISAL_FORM.Form!APPRAISAL_ID"
appid1 = "Forms!frm_prod_appr_comments!APPRAISAL_ID"
stLinkCriteria = (appid1 = appid)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_open_frm_prod_appr_comments_Click:
Exit Sub
Err_open_frm_prod_appr_comments_Click:
MsgBox Err.Description
Resume Exit_open_frm_prod_appr_comments_Click
End Sub
field is dbl clicked and have it display the contents of the field that was
dbl clicked. I have tried using the wherecondition in the openform command,
but it filters the opened form to just a new record and does not link it to
the record that was active. Can anyone see where I have gone wrong?
Private Sub APPRAISAL_COMMENTS_DblClick(Cancel As Integer)
On Error GoTo Err_open_frm_prod_appr_comments_Click
Dim stDocName As String
Dim stLinkCriteria As String
Dim appid As String
Dim appid1 As String
stDocName = "frm_prod_appr_comments"
appid =
"Forms!Range_Form1.product_form1_new_one.PRODUCT_APPRAISAL_FORM.Form!APPRAISAL_ID"
appid1 = "Forms!frm_prod_appr_comments!APPRAISAL_ID"
stLinkCriteria = (appid1 = appid)
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_open_frm_prod_appr_comments_Click:
Exit Sub
Err_open_frm_prod_appr_comments_Click:
MsgBox Err.Description
Resume Exit_open_frm_prod_appr_comments_Click
End Sub