cuok
Programmer
- Dec 24, 2001
- 201
Hi All!
Please help to change the bold row (down) that opens a table to open a query instead of a table
Dim db As Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("tblName"
With rs
.MoveFirst
Do Until rs.EOF
If ((Me.DateIn > rs![DateIn]) And (Me.DateOut < rs!DateOut)) Then MsgBox Me.DateIn & ">" & rs![DateIn] & " And " & Me.DateOut & "<" & rs!DateOut
.MoveNext
Loop
.Close
End With
Set rs = Nothing
Thanks in advance
CUOK
Please help to change the bold row (down) that opens a table to open a query instead of a table
Dim db As Database
Dim rs As DAO.Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("tblName"
With rs
.MoveFirst
Do Until rs.EOF
If ((Me.DateIn > rs![DateIn]) And (Me.DateOut < rs!DateOut)) Then MsgBox Me.DateIn & ">" & rs![DateIn] & " And " & Me.DateOut & "<" & rs!DateOut
.MoveNext
Loop
.Close
End With
Set rs = Nothing
Thanks in advance
CUOK