Hi, getting a Run-time error '3075': Syntax error (missing operator) in query expression 'Birthday = and Birthmonth ='.
Probably having to do with spaces but can't see it, any assistance would be greatly appreciated
Function DisplayBirthdayList()
Dim rs As Recordset
Dim sql As String
Dim numberOfBD As Integer
Dim sList As String
sql = "Select * from qryBirthdayList Where Birthday = " & Format(dSelectDate, "dd") & " and Birthmonth = " & Format(dSelectDate, "mm") & ";"
Set rs = CurrentDb.OpenRecordset(sql)
Thanks
Probably having to do with spaces but can't see it, any assistance would be greatly appreciated
Function DisplayBirthdayList()
Dim rs As Recordset
Dim sql As String
Dim numberOfBD As Integer
Dim sList As String
sql = "Select * from qryBirthdayList Where Birthday = " & Format(dSelectDate, "dd") & " and Birthmonth = " & Format(dSelectDate, "mm") & ";"
Set rs = CurrentDb.OpenRecordset(sql)
Thanks