I believe I am missing something so obvious. I am trying to open a form with multiple criteria in VBA, here is what I have:
Private Sub Text2_Click()
Dim iCost_Center As Integer
Dim sCategory As String
Dim sWhere As String
Dim sFormName As String
iCost_Center = Me.txtCOST_CENTER
sCategory = Me.txtTemp_Month_Temp_Per
sWhere = "[COST_CENTER] = " & iCost_Center And "[CATEGORY] = " & "'" & sCategory & "'" 'This line is throwing up a Runtime Error 13
sFormName = "frm: Ledger Detail"
DoCmd.OpenForm sFormName, acViewNormal, , sWhere, , acDialog
Is there something I need to do to account for when combining an integer and a string in a WHERE clause?
Very much appreciated,