J
JulieD
Okay, i'm stumped
i'm running the following code from a module (Access 97) - section1 works
find and retrieves 13 records
Section 2 SHOULD retrieve 8 records but it only retrieves one
Can't figure this out and i need to URGENTLY - all help gratefully received
*****
Code
Dim dbs as DAO.Database
Dim rst as DAO.Recordset
Dim strsql as String
Dim numrecs as integer
Section 1
set dbs = currentdb
strsql = "SELECT sysTBL_DataTables.Order,
sysTBL_DataTables.TableName " _
& "FROM sysTBL_DataTables ORDER BY sysTBL_DataTables.Order"
Set rst = dbs.OpenRecordset(strsql)
numrecs = rst.recordcount 'returns 13 which is correct
~other code~
rst.close
rst = nothing
Section 2
strsql = "SELECT ztbl_Jurisdiction.Jurisdiction FROM
ztbl_Jurisdiction ORDER BY Jurisdiction"
set rst = dbs.OpenRecordset(strsql)
numrecs = rst.recordcount 'returns 1 should be 8
*** end code
Section 2 is returning the first record in the table, and if i order it
descending it returns the last one - but for some reason it is not returning
ALL the records
any ideas????
Regards
JulieD
i'm running the following code from a module (Access 97) - section1 works
find and retrieves 13 records
Section 2 SHOULD retrieve 8 records but it only retrieves one
Can't figure this out and i need to URGENTLY - all help gratefully received
*****
Code
Dim dbs as DAO.Database
Dim rst as DAO.Recordset
Dim strsql as String
Dim numrecs as integer
Section 1
set dbs = currentdb
strsql = "SELECT sysTBL_DataTables.Order,
sysTBL_DataTables.TableName " _
& "FROM sysTBL_DataTables ORDER BY sysTBL_DataTables.Order"
Set rst = dbs.OpenRecordset(strsql)
numrecs = rst.recordcount 'returns 13 which is correct
~other code~
rst.close
rst = nothing
Section 2
strsql = "SELECT ztbl_Jurisdiction.Jurisdiction FROM
ztbl_Jurisdiction ORDER BY Jurisdiction"
set rst = dbs.OpenRecordset(strsql)
numrecs = rst.recordcount 'returns 1 should be 8
*** end code
Section 2 is returning the first record in the table, and if i order it
descending it returns the last one - but for some reason it is not returning
ALL the records
any ideas????
Regards
JulieD