If I run the following code, I get all the records in my database.
Dim d As DAO.Database
Dim dSQL As String
Dim drs As DAO.Recordset
dSQL = "SELECT * FROM [DBx45GH];"
Set d = OpenDatabase("C:\Users\X45\_DB\_DBx45.accdb")
Set drs = d.OpenRecordset(dSQL, dbOpenDynaset)
The above code returns a recordset that includes records with the RID=201907041504102
If I run the following code it does not return any records for RID=201907041504102.
Dim d As DAO.Database
Dim dSQL As String
Dim drs As DAO.Recordset
dSQL = "SELECT * FROM [DBx45GH] WHERE [DBx45GH].[RID]=201907041504102;"
Set d = OpenDatabase("C:\Users\X45\_DB\_DBx45.accdb")
Set drs = d.OpenRecordset(dSQL, dbOpenDynaset)
Can any provide any guidance into what I may be doing wrong?
If I change the WHERE RID= to a different RID ...sometimes it returns records sometimes it doesn't.
Each RID definitely has records in the database.
FYI... the recordset has RID's with last 3 digits starting from 101 to 110.
It seems to randomly not return any records eg RID's ending in 102,106,110
Bookmarks