I am trying to set up a form (Switchboard) that will open another form (Case Form) or report (Case Report) based on a series of criteria (Fiscal Year, Quarter, Case Number). On the switchboard there will be three text blocks where users can enter one, two or all three of the above mentioned items, hit either the View Case Form or View Case Report button to view only records that match those criteria. I've attached the VBA code I am working on right now, but when I search using 2013 for the Fiscal Year, I get a "Run-time Error: 13 Type mismatch" message. Below is the setup of the tables and forms, and the vba code.
Table: tblCase; with FiscalYear, Quarter, CaseNbr fields
Form: Switchboard; three text boxes named SearchFY, SearchQuarter, and SearchCaseNbr, and button Command7 (haven't changed the name yet)
Form: Case Form; Controls for FiscalYear, Quarter, and CaseNbr
VBA Code
Private Sub Command7_Click()
DoCmd.OpenForm "Case Form", , , "[FiscalYear] like '" & Me!SearchFY & "*' and [Quarter] like '" & Me!SearchQuarter * "*'"
End Sub
Any help would be appreciated