jeran042
Registered User.
- Local time
- Today, 04:29
- Joined
- Jun 26, 2017
- Messages
- 127
Im sure Im missing something so obvious, but cant seem to troubleshoot it. I am getting a type mismatch on the following code:
Can someone point out what I'm doing wrong? :banghead:
Very much appreciated!!
Code:
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 is the line throwing up the error
sFormName = "frm: Ledger Detail"
DoCmd.OpenForm sFormName, acViewNormal, , sWhere, , acDialog
End Sub
Can someone point out what I'm doing wrong? :banghead:
Very much appreciated!!