I have a table in an Access DB which has several records with the same value in a number field (called DIN Number). I have a query to get all the records with a specified DIN number. In Access I open the query type a number (eg 5) and it returns all the records with DIN number = 5. In this case (6 records).
When I open the query from my VB 5.0 program the max number of records it will get is 2. So I pass the parameter input, DIN number = 5, knowing there are 6 records and the record.count property = 2. the data for the first two records in consistent with the first two records of the six opened in access.
This happens for all DIN numbers, if there is more than 2 records it will only count two.
Why is this and how do I fix it?
VB code follows:
On Error Resume Next
For i = 1 To rstDINsDetails.RecordCount
String1 = rstDINsDetails.Fields("Ref Number")
string 2= format(rstDINsDetails.RecordCount)
' not exact code in loop, actual code is too large
Thanks in advance,