Results 1 to 5 of 5
  1. #1
    akkw
    Guest

    Error Message 2486 (Access 2000 SR-1)

    I have an unbound form with 2 unbound subforms on it.
    I want to synchronize the two forms so clicking in a relevant ID in the list view subform
    Flicks the other subform to view to the single matching record.
    Both are based upon the same SQL query which is filled from combo box choices on the main form and some VBA to build the SQL

    The synchronising code is below..

    In Access 97 and 2002 this works fine but in 2000 only I get
    Error 2486 - You cannot carry out this action at this time.

    Then nothing runs, the form cannot be closed by any means and Access crashes out.
    This does not happen all the time, just some of the time.

    There are no other events for the form I took them all out and it still hangs.

    Any Ideas or is it just ACCESS 2000 being awkard.

    CODE...........

    Private Sub Name_Click()

    Dim varRec As Variant
    Dim strName As String

    'Select Appropriate Client in the main Form Screen
    Dim lngID As Long, varBK As Variant
    Dim rst As DAO.Recordset

    strName = Me.Parent.Name
    lngID = Me![tblContact.ContactID]
    Set rst = Me.Parent!frmContactDetail.Form.RecordsetClone
    If rst.RecordCount > 0 Then
    rst.MoveFirst
    rst.FindFirst "[tblContact].[ContactID] = " & lngID
    varBK = rst.Bookmark

    End If
    Set rst = Nothing
    Forms(strName)("frmContactDetail").Form.Bookmark = varBK


    End Sub

    I've also tried it with other methods such as

    me.parent"frmContactDetail.form.setfocus
    docmd.gotorecord,,acgoto,me.currentrecord

    That's even worse.

    It worked in 95, 97 and tested ok on 2002 but 2000 - NOPE.

    This is running on Windows 98 v 2 ( But same problem in Windows 2000 Professional

  2. #2
    Star Lounger
    Join Date
    Nov 2001
    Location
    Illinois, USA
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Error Message 2486 (Access 2000 SR-1)

    I don't really know what's wrong here, but will try a couple of stabs in the dark. Try doing a rs.Movelast before doing the rs.recordcount. I don't know why your code is acting differently in the different versions, and inconsistently at that, but it might be worth a shot. Also, sometimes with all the subforms, Access gets confused about who "Me" is; you might want to try expanding out the "Me" to Forms!frmsoandso...etc.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Error Message 2486 (Access 2000 SR-1)

    If you're running all three versions on the same machine, the problem may be that Office XP installs an "updated" version of the VBE6.dll, which can break Access 2000. Since Access 97 uses the VBE5.dll, it would not be affected by this. If you create the form in XP using the 2000 database format, can you take it to another machine and run it with 2000? What kind of behavior do you see there?
    Charlotte

  4. #4
    akkw
    Guest

    Re: Error Message 2486 (Access 2000 SR-1)

    Thanks for the reply

    It was developed on a PC running 97 and XP.
    It was done in 2000 format.
    When converted to 97 and run on any PC it works fine
    When taken to a pC with just 2000 on it, the problem occurs.

    I have resolved the problem now by converting One of the Subforms to a List box
    and using the ListIndex property to get the record Position.
    I also ported the Fields from the Other Subform onto the Main Form.

    The modified Code is below and hey its a lot simpler too.

    This is of course what happens when you have to update a database that someone else wrote.

    This works in all three versions with No Crashes (Happy Man)
    But from an Academic point of view now I'd still love to know why it failed in 2000 only.

    CODE....
    Private Sub lstContact_AfterUpdate()

    Dim lngID As Long, strform As String

    lngID = lstContact.ListIndex + 1
    strform = Me.Name
    DoCmd.GoToRecord acForm, strform, acGoTo, lngID

    End Sub

  5. #5
    akkw
    Guest

    Re: Error Message 2486 (Access 2000 SR-1)

    Thanks.

    I'll give it a go. I have already tried eliminating the Me aspect but no joy there.

    I have resolved the problem now by converting One of the Subforms to a List box
    and using the ListIndex property to get the record Position.
    I also ported the Fields from the Other Subform onto the Main Form.

    The modified Code is below and hey its a lot simpler too.

    This is of course what happens when you have to update a database that someone else wrote.

    This works in all three versions with No Crashes (Happy Man)
    But from an Academic point of view now I'd still love to know why it failed in 2000 only.

    CODE....
    Private Sub lstContact_AfterUpdate()

    Dim lngID As Long, strform As String

    lngID = lstContact.ListIndex + 1
    strform = Me.Name
    DoCmd.GoToRecord acForm, strform, acGoTo, lngID

    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •