If I run the following code:
Set rst = db.OpenRecordset("tblBooking")
Then it returns 7; the correct value
If I alter this slightly:
Set rst = db.OpenRecordset("SELECT * FROM tblBooking")
Then it returns 1; obviously the wrong value.
The reason why I wish to do this is because I actually wish to run the following:
Set rst = db.OpenRecordset("SELECT * FROM tblBooking WHERE dteDate=#" & txtDate.value & "#")
But this returns 1 (clearly since the first section returns an error.
Why?
Oh, BTW, I have set the following:
Dim db As Database
Dim rst As DAO.Recordset
Set db = CurrentDb()
The returning code is:
lblNo.Caption = "There are currently " & rst.RecordCount & " bookings for that date."