Hi,
I'm hoping someone can help. I'm pretty sure I've missed or done something silly here.
When I use the code below I get the message "Run-time error 13 type mismatch" . I'm not sure if it has anything to do with it being a numerical field or not. Any help is much appreciated.
The second where line seems to be where the problem lies.
Wrightie
I'm hoping someone can help. I'm pretty sure I've missed or done something silly here.
When I use the code below I get the message "Run-time error 13 type mismatch" . I'm not sure if it has anything to do with it being a numerical field or not. Any help is much appreciated.
The second where line seems to be where the problem lies.
Wrightie
Code:
Private Sub cmdOK_Click()
Dim db As DAO.Database
Dim QD As QueryDef
Dim where As Variant
Set db = CurrentDb()
On Error Resume Next
db.QueryDefs.Delete ("Qry_By_Period_Entered")
On Error GoTo 0
where = Null
where = where & " AND [PeriodEntered]=" + Me![Period_Combo]
Set QD = db.CreateQueryDef("Qry_By_Period_Entered", _
"Select * FROM Qry_By_Ccy " & (" where " + Mid(where, 6) & ";"))
DoCmd.OpenReport "Premium_By_Period", acViewPreview, , , acWindowNormal
End Sub