I'm running the below code:
Dim db As Database
Dim rst As Recordset
Dim Counter As Integer
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT [Field] FROM tbl_Imports WHERE [Use] Is Not Null", dbOpenDynaset)
Counter = rst.RecordCount
MsgBox Counter
& the MsgBox is coming back with a result of 1. The SQL returns 7 records so this is what I'm trying to set the counter to. Can anyone see where I'm going wrong? Hugely perplexed!!
Thanks
merry_fay
Dim db As Database
Dim rst As Recordset
Dim Counter As Integer
Set db = CurrentDb
Set rst = db.OpenRecordset("SELECT [Field] FROM tbl_Imports WHERE [Use] Is Not Null", dbOpenDynaset)
Counter = rst.RecordCount
MsgBox Counter
& the MsgBox is coming back with a result of 1. The SQL returns 7 records so this is what I'm trying to set the counter to. Can anyone see where I'm going wrong? Hugely perplexed!!
Thanks
merry_fay