I have a table field named IDNumber that stores Social Security Numbers. I have a switchboard form with a text box and a command button.
Users are to enter a Social Security Number into the text box, and then click the command button which should open "frmAdjRequest". frmAdjRequest should then open filtered only to display records matching the user's input. It is not working. Below is my code.
Private Sub cmdSSNFilter_Click()
On Error GoTo Err_cmdSSNFilter_Click
Dim SSN As Variant
Dim FormFilter As Variant
SSN = [Forms]![FrmMainMenu]![txtSearchIDNumber]
FormFilter = "IDNumber = 'SSN'"
DoCmd.OpenForm "frmAdjRequest", , , FormFilter, , , "NoAdditions"
Exit_cmdSSNFilter_Click:
Exit Sub
Err_cmdSSNFilter_Click:
MsgBox Err.Description
Resume Exit_cmdSSNFilter_Click
End Sub
--
Mike
Why make it simple and efficient when it can be complex and wonderful?
Users are to enter a Social Security Number into the text box, and then click the command button which should open "frmAdjRequest". frmAdjRequest should then open filtered only to display records matching the user's input. It is not working. Below is my code.
Private Sub cmdSSNFilter_Click()
On Error GoTo Err_cmdSSNFilter_Click
Dim SSN As Variant
Dim FormFilter As Variant
SSN = [Forms]![FrmMainMenu]![txtSearchIDNumber]
FormFilter = "IDNumber = 'SSN'"
DoCmd.OpenForm "frmAdjRequest", , , FormFilter, , , "NoAdditions"
Exit_cmdSSNFilter_Click:
Exit Sub
Err_cmdSSNFilter_Click:
MsgBox Err.Description
Resume Exit_cmdSSNFilter_Click
End Sub
--
Mike
Why make it simple and efficient when it can be complex and wonderful?