RaabiAnony
New member
- Local time
- Today, 19:16
- Joined
- Aug 28, 2016
- Messages
- 1
Hello everybody!
This is my first post about a problem in MS Access. I am using the following statements:
All the three statements return the same error as follows:
Syntx error (missing operator) in query expression
It drops the Operator 'AND' from all the statements.
Would anyone help in sorting out this problem, please!
Regards
This is my first post about a problem in MS Access. I am using the following statements:
Code:
Dim dtStart As Date
Dim dtEnd As Date
Dim strSql As String
rptName = "rptStudentsByDoB"
dtStart = Me.txtDateStart.Value
dtEnd = Me.txtDateEnd.Value
strSql = "Select * From tblStudents " & _
" WHERE DoB < '" & dtStart & "' AND DoB > '" & dtEnd & "'"
strSql = "Select * From tblStudents " & _
" WHERE DoB Between #" & dtStart & "# AND #" & dtEnd & "#"
strSql = "select * from tblStudents where DoB BETWEEN " & dtStart & " AND " & dtEnd
Syntx error (missing operator) in query expression
Code:
DoB < #dtStart# DoB > #dtEnd#
Would anyone help in sorting out this problem, please!
Regards