Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / September 2003

Tip: Looking for answers? Try searching our database.

Strange errors/MS Form 2.0 Library

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SFAxess - 17 Sep 2003 21:55 GMT
Hello,
I have been developing an ADP in Access 2000. Midway
through development, I upgraded to Access 2002, but kept
the file format Access 2000 since all client machines
have Access 2000. After working on the application for a
month on Access 2002 (in 2000 file format), I just moved
it over to a machine with Access 2000 and am getting
strange errors that never existed before and don't come
up when I run it in Access 2002.
Specifically, I get a (2465) stating that Access can't
find the field 'Forms' referred to in the expression.
This occurs when using record navigation code which I
have used countless times. See code below:

This is based on code from Access 97 Developer's Handbook
by Litwin, Getz, and Gilbert (Sybex)
Copyright 1997.  All rights reserved.

Private Sub NavMove(frm As Form, intWhere As Integer)

   '
   ' Move to the correct row in the form's recordset,
   ' depending on which button was pushed.  This code
doesn't
   ' really need to check for errors, since the buttons
   ' that would cause errors have been disabled already.
   '
   Dim rst As ADODB.Recordset
   Dim fAtNew As Boolean
   
   Set rst = New ADODB.Recordset
   
Const adhcErrNoCurrentRow = 3021
   
   If frm.Dirty Then
       ' Put code here that you would have done in the
       ' form's AfterUpdate event. You can't use the
AfterUpdate
       ' event if you've got these buttons in place,
since
       ' they interfere pretty seriously.
   End If
   
   On Error GoTo NavMoveError
   ' This only works on the CURRENT form.
   ' You'll need to rethink this if you want
   ' the buttons on one form, and the record
   ' movement on another.
   If intWhere = acNewRec Then
       DoCmd.GoToRecord record:=acNewRec
   Else
       fAtNew = frm.NewRecord
       Set rst = frm.RecordsetClone
       rst.Bookmark = frm.Bookmark
       Select Case intWhere
           Case acFirst
               rst.MoveFirst
           Case acPrevious
               If fAtNew Then
                   rst.MoveLast
               Else
                   rst.MovePrevious
               End If
           Case acNext
               rst.MoveNext
           Case acLast
               rst.MoveLast
       End Select
       frm.Bookmark = rst.Bookmark
   End If

NavMoveExit:
   Exit Sub

NavMoveError:
   If Err.Number = adhcErrNoCurrentRow And frm.NewRecord
Then
       Resume Next
   Else
       MsgBox Err.Description & " (" & Err.Number & ")"
       Resume NavMoveExit
   End If
   Resume NavMoveExit
End Sub

The only thing I can think of is the reference to
the "Microsoft Forms 2.0 Object Library" which is in the
project, but does not normally exist in the Access 2000
reference list.
Does anyone know of a glitch with using Access 2000 file
format while developing in Access 2002?
Thank you so much in advance
Alick [MSFT] - 18 Sep 2003 07:47 GMT
Hi,

Do you use the UserForm object in your application? If so, please take a
look at the article:

ACC2000: Access 2000 Does Not Support the UserForm Object
http://support.microsoft.com/?id=198646

In addition, could you point out which code line causes the error?

Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "SFAxess" <no@email.com>
[quoted text clipped - 93 lines]
| format while developing in Access 2002?
| Thank you so much in advance
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.