I have a subform I am using on a form. I would like to modify the code below that I have for a button on the form. I would like to use the master and child field link in the code below to only show candidates related to the main form. The link is candidate id. I have this working with a subform on the form but I would like to have this only display as a pop-up once the user clicks the button on the form. Is this possible? Thanks..
Private Sub Candidates_Click()
On Error GoTo Err_Candidates_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "CandidatesCPR_Frm"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Candidates_Click:
Exit Sub
Err_Candidates_Click:
MsgBox Err.Description
Resume Exit_Candidates_Click
End Sub
Private Sub Candidates_Click()
On Error GoTo Err_Candidates_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "CandidatesCPR_Frm"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Candidates_Click:
Exit Sub
Err_Candidates_Click:
MsgBox Err.Description
Resume Exit_Candidates_Click
End Sub