I have a FORM that has one drop down field. Based on the drop down selected ( Me.cmd_selector) I would like to open the specific form? stDocName in the comment is the form name I would like to open. What changes should I make for the code below..
Private Sub cmd_form_Open_Click()
On Error GoTo Err_cmd_form_Open_Click
Dim stDocName As String
Dim stLinkCriteria As String
'stDocName = "ASSAY_Main_frm"
'DoCmd.OpenForm stDocName, , , stLinkCriteria
Me.cmd_selector = "GT Unit Info" ' stDocName = "GT_unit_Main_Frm"
Me.cmd_selector ="GT Assay Info" 'stDocName = "GT_Assay_Details_Survey_Responses_frm"
Me.cmd_selector ="PR unit Info" 'stDocName = "PR_Unit_Main"
Me.cmd_selector ="PR Assay Info" 'stDocName = "PR_Assay_details_Main"
Exit_cmd_form_Open_Click:
Exit Sub
Err_cmd_form_Open_Click:
MsgBox Err.Description
Resume Exit_cmd_form_Open_Click
End Sub
Thank you,