Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2003
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Run-time Error 2585 (Access 2000 Database opened from Windows XP)

    I have an Access 2000 database that works the way it is supposed to work on all Windows 2000/Office 2000 computers, but users on computers with Windows XP/Office XP are getting the following error message when trying to run a report from a command button with the following code behind it: "Run-time error 2585 - This action can't be carried out while processing a form or report event." Can anyone help me correct this so that the XP users will be able to run the report? I'd very much appreciate any advice anyone can give me. Many thanks...Mary

    Private Sub Report_Close()
    DoCmd.Close acForm, "frmRunParQry"
    End Sub

    Private Sub Report_NoData(Cancel As Integer)
    MsgBox "There is no data for this report. Canceling report..."
    Cancel = -1
    End Sub

    Private Sub Report_Open(Cancel As Integer)
    DoCmd.OpenForm "frmRunParQry", , , , , acDialog, "rpt Raw Material"
    If Not IsLoaded("frmRunParQry") Then
    Cancel = True
    End If
    End Sub

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Run-time Error 2585 (Access 2000 Database opened from Windows XP)

    Mary,

    Do you know where the error is occurring? I'd add some error trapping to your Open Event (at the very least, a "On Error Resume Next").
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2003
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run-time Error 2585 (Access 2000 Database opened from Windows XP)

    Hello, Mark, many thanks for the advice! Since I added the "On Error Resume Next " code to the command button on the form (see below) , the report now runs fine in XP! I looked and looked for information regarding that run-time error #2585 and could find nothing about it. I won't worry about it now since the error code did the trick. Again, I very much appreciate your quick response and the tip. ...Mary

    Private Sub Command7_Click()
    On Error Resume Next
    DoCmd.OpenReport "rpt CAS", acViewPreview
    Me.Form.Visible = False
    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
  •