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

Object invaliad or no longer set error after onverting from Access 97 to 2000

P: n/a
Hello
I have a very complex database application, which have been working
fine for several years in Access 97. Now I had to convert it into
Access 2000.
The main form (course) has got 2 subforms. One subform (course
occurrence) has got 4 subforms of its own, another subform (course web
description) has got 1. The main form has got navigation buttons,
occurrence subform has got navigation buttons (there can be several
occurrences of the course) and one of the second level subforms
(qualifications) has got own navigation buttons. The navigation
buttons are from Access 97 Developer's Handbook by Litwin, Getz and
Gilbert. In Access 97 version of the application these custom
navigation buttons were a blessing, now it is a pain.
Quite a lot of VBA code (including Navigation module from Developer's
Handbook) uses a concept of recordsetclone. As long as one navigates
through the form, it's OK. But every other action: opening of another
form, for example, then the return to the course form, and here it is:
Object invalid and no longer set.
I have commented all "On Error..." statements throughout the code to
catch, what generates the error. The problem seems to be
recordsetclone, and not set recordsetclone command itself, but next
after it, for example in module Navigation:
Function adhEnableButtons(frm As Form)
'
' Attached to the specified form's Current event.
'
' This function enables and disables buttons as
' necessary, depending on which is the current
' record on the form.
'
' This function counts on buttons named cmdFirst,
' cmdPrev, cmdNext, cmdLast and cmdNew. One
' could code around this, but it seemed like
' overkill for this example.
'
' In:
' frm: A reference to the form in question.
' Out:
' Nothing

Dim rst As DAO.Recordset
Dim fAtNew As Integer
Dim fUpdatable As Integer
'The following command and label is added by me - Galina
'On Error GoTo TheEnd:
frm!txtCurrRec = frm.CurrentRecord
Set rst = frm.RecordsetClone
rst.MoveLast

After one returns to the courses form, rst.MoveLast throws the
application out.
I really wouldn't like to change navigation buttons. What can I do?
Any help would be greatly appreciated.
I believe, I have service pack 7 for jet installed on my PC:
4.0.7328.0
Galina
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
First thing to try is Jet 4 SP8 (version 4.0.8015).
Download from support.microsoft.com

Also make sure you have Office 2000 SP3.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Galina" <ga****@mail.ru> wrote in message
news:ec*************************@posting.google.co m...
Hello
I have a very complex database application, which have been working
fine for several years in Access 97. Now I had to convert it into
Access 2000.
The main form (course) has got 2 subforms. One subform (course
occurrence) has got 4 subforms of its own, another subform (course web
description) has got 1. The main form has got navigation buttons,
occurrence subform has got navigation buttons (there can be several
occurrences of the course) and one of the second level subforms
(qualifications) has got own navigation buttons. The navigation
buttons are from Access 97 Developer's Handbook by Litwin, Getz and
Gilbert. In Access 97 version of the application these custom
navigation buttons were a blessing, now it is a pain.
Quite a lot of VBA code (including Navigation module from Developer's
Handbook) uses a concept of recordsetclone. As long as one navigates
through the form, it's OK. But every other action: opening of another
form, for example, then the return to the course form, and here it is:
Object invalid and no longer set.
I have commented all "On Error..." statements throughout the code to
catch, what generates the error. The problem seems to be
recordsetclone, and not set recordsetclone command itself, but next
after it, for example in module Navigation:
Function adhEnableButtons(frm As Form)
'
' Attached to the specified form's Current event.
'
' This function enables and disables buttons as
' necessary, depending on which is the current
' record on the form.
'
' This function counts on buttons named cmdFirst,
' cmdPrev, cmdNext, cmdLast and cmdNew. One
' could code around this, but it seemed like
' overkill for this example.
'
' In:
' frm: A reference to the form in question.
' Out:
' Nothing

Dim rst As DAO.Recordset
Dim fAtNew As Integer
Dim fUpdatable As Integer
'The following command and label is added by me - Galina
'On Error GoTo TheEnd:
frm!txtCurrRec = frm.CurrentRecord
Set rst = frm.RecordsetClone
rst.MoveLast

After one returns to the courses form, rst.MoveLast throws the
application out.
I really wouldn't like to change navigation buttons. What can I do?
Any help would be greatly appreciated.
I believe, I have service pack 7 for jet installed on my PC:
4.0.7328.0
Galina

Nov 12 '05 #2

P: n/a
Allen
Thank you very much! It worked!!!
Galina

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message news:<40***********************@freenews.iinet.net .au>...
First thing to try is Jet 4 SP8 (version 4.0.8015).
Download from support.microsoft.com

Also make sure you have Office 2000 SP3.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Galina" <ga****@mail.ru> wrote in message
news:ec*************************@posting.google.co m...
Hello
I have a very complex database application, which have been working
fine for several years in Access 97. Now I had to convert it into
Access 2000.
The main form (course) has got 2 subforms. One subform (course
occurrence) has got 4 subforms of its own, another subform (course web
description) has got 1. The main form has got navigation buttons,
occurrence subform has got navigation buttons (there can be several
occurrences of the course) and one of the second level subforms
(qualifications) has got own navigation buttons. The navigation
buttons are from Access 97 Developer's Handbook by Litwin, Getz and
Gilbert. In Access 97 version of the application these custom
navigation buttons were a blessing, now it is a pain.
Quite a lot of VBA code (including Navigation module from Developer's
Handbook) uses a concept of recordsetclone. As long as one navigates
through the form, it's OK. But every other action: opening of another
form, for example, then the return to the course form, and here it is:
Object invalid and no longer set.
I have commented all "On Error..." statements throughout the code to
catch, what generates the error. The problem seems to be
recordsetclone, and not set recordsetclone command itself, but next
after it, for example in module Navigation:
Function adhEnableButtons(frm As Form)
'
' Attached to the specified form's Current event.
'
' This function enables and disables buttons as
' necessary, depending on which is the current
' record on the form.
'
' This function counts on buttons named cmdFirst,
' cmdPrev, cmdNext, cmdLast and cmdNew. One
' could code around this, but it seemed like
' overkill for this example.
'
' In:
' frm: A reference to the form in question.
' Out:
' Nothing

Dim rst As DAO.Recordset
Dim fAtNew As Integer
Dim fUpdatable As Integer
'The following command and label is added by me - Galina
'On Error GoTo TheEnd:
frm!txtCurrRec = frm.CurrentRecord
Set rst = frm.RecordsetClone
rst.MoveLast

After one returns to the courses form, rst.MoveLast throws the
application out.
I really wouldn't like to change navigation buttons. What can I do?
Any help would be greatly appreciated.
I believe, I have service pack 7 for jet installed on my PC:
4.0.7328.0
Galina

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.