Hello! Still a bit new to access and VB but getting better! I have a form called "Orders Switchboard_frm" which has a combo box called "PurchasingApproval_cmb". When a value in the combo box is selected, a password form appears (frmPassword) to limit access to the next form that will be opened (RequisitionApproval_frm). I have this code on the OnClick event of a button on the password form, but I would like the "myVar" to get the filter off of a selection from the combo box on the "Orders Switchboard_frm" form. Anyone know how to do this? Thanks in advance.
Private Sub cmdOK_Click()
Dim myVar
myVar = "[Group] = '" & PurchasingApproval_cmb.Value & "'"
If Me.txtPassword = "Password" Then
DoCmd.OpenForm "RequisitionApproval_frm", WhereCondition:=myVar
DoCmd.Close acForm, Me.Name
Else
MsgBox "Incorect Password", vbCritical, "Input Data Error"
Me.txtPassword.SetFocus
Me.txtPassword = ""
End If
End Sub