By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,263 Members | 2,640 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,263 IT Pros & Developers. It's quick & easy.

converting access 97 to access 2000 and dao.recordset

P: n/a
hello

i am in the midst of converting all of the "inherited" databases from
access 97 to access 2000. one of the issues i have is the basic one:
dao.recordset. i have read that i need to simply turn off the ADO
reference and change the reference ms dao 3.6 object library to ms dao
3.51 object library or "disambiguate the code". i tried both and i
still receive the error message "run time error 3420 - object invalid
or no longer set."

Dim Dbe As Database
Dim RstSW As dao.Recordset

Set Dbe = DBEngine(0)(0)
Set RstSW = Dbe.OpenRecordset("SELECT * FROM [ScanWindowStructures]
WHERE (([ST ElementType] = '" & TSysMode & "'))")

why can't i set the RstSW as a dao.recordset?
any advise will be appreciated.
thanks in advance - jung
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
DAO 3.51 is the DAO used with the Jet 3.5 that came with Access 97. Jet 4.0,
the one included with Access 2000 and later, uses DAO 3.6, so you'd have to
have some unusual circumstances to need to change the reference to 3.51. Try
restoring to the 3.6 version and see if it works any better.

Larry Linson
Microsoft Access MVP

"JMCN" <pi******@yahoo.fr> wrote in message
news:27**************************@posting.google.c om...
hello

i am in the midst of converting all of the "inherited" databases from
access 97 to access 2000. one of the issues i have is the basic one:
dao.recordset. i have read that i need to simply turn off the ADO
reference and change the reference ms dao 3.6 object library to ms dao
3.51 object library or "disambiguate the code". i tried both and i
still receive the error message "run time error 3420 - object invalid
or no longer set."

Dim Dbe As Database
Dim RstSW As dao.Recordset

Set Dbe = DBEngine(0)(0)
Set RstSW = Dbe.OpenRecordset("SELECT * FROM [ScanWindowStructures]
WHERE (([ST ElementType] = '" & TSysMode & "'))")

why can't i set the RstSW as a dao.recordset?
any advise will be appreciated.
thanks in advance - jung

Nov 13 '05 #2

P: n/a
Dim DBe as dao.database

set DBe = CurrentDB()

What is TSysMode ?

Where do you get the error? What else does the code do?

(david)

"JMCN" <pi******@yahoo.fr> wrote in message
news:27**************************@posting.google.c om...
hello

i am in the midst of converting all of the "inherited" databases from
access 97 to access 2000. one of the issues i have is the basic one:
dao.recordset. i have read that i need to simply turn off the ADO
reference and change the reference ms dao 3.6 object library to ms dao
3.51 object library or "disambiguate the code". i tried both and i
still receive the error message "run time error 3420 - object invalid
or no longer set."

Dim Dbe As Database
Dim RstSW As dao.Recordset

Set Dbe = DBEngine(0)(0)
Set RstSW = Dbe.OpenRecordset("SELECT * FROM [ScanWindowStructures]
WHERE (([ST ElementType] = '" & TSysMode & "'))")

why can't i set the RstSW as a dao.recordset?
any advise will be appreciated.
thanks in advance - jung

Nov 13 '05 #3

P: n/a
thanks for responding but now we are told and forced to convert all
databases to access 2003. so in the end, i will more likely rewrite
some of the code because the code is part of a splash screen that
identifies users and calculate business days. so i'll be looking at
other posts regarding conversion acc97 to acc2003.

thanks again!!! cheers - jung

"Larry Linson" <bo*****@localhost.not> wrote in message news:<GS*****************@nwrddc04.gnilink.net>...
DAO 3.51 is the DAO used with the Jet 3.5 that came with Access 97. Jet 4.0,
the one included with Access 2000 and later, uses DAO 3.6, so you'd have to
have some unusual circumstances to need to change the reference to 3.51. Try
restoring to the 3.6 version and see if it works any better.

Larry Linson
Microsoft Access MVP

"JMCN" <pi******@yahoo.fr> wrote in message
news:27**************************@posting.google.c om...
hello

i am in the midst of converting all of the "inherited" databases from
access 97 to access 2000. one of the issues i have is the basic one:
dao.recordset. i have read that i need to simply turn off the ADO
reference and change the reference ms dao 3.6 object library to ms dao
3.51 object library or "disambiguate the code". i tried both and i
still receive the error message "run time error 3420 - object invalid
or no longer set."

Dim Dbe As Database
Dim RstSW As dao.Recordset

Set Dbe = DBEngine(0)(0)
Set RstSW = Dbe.OpenRecordset("SELECT * FROM [ScanWindowStructures]
WHERE (([ST ElementType] = '" & TSysMode & "'))")

why can't i set the RstSW as a dao.recordset?
any advise will be appreciated.
thanks in advance - jung

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.