subform popup (1 Viewer)

gbanks

Registered User.
Local time
Today, 02:45
Joined
Feb 9, 2000
Messages
161
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
 

KenHigg

Registered User
Local time
Yesterday, 21:45
Joined
Jun 9, 2004
Messages
13,327
I think you're twisting the whole form/subform concept out of wack. If you would like to have a popup form appear to select the main form criteria I would loose the whole subform thing and just do a popup form that sets a parameter for the main form's recordsource query...

ken :)
 

Users who are viewing this thread

Top Bottom