Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2002

    Unanswered: Run-time error '2486

    I have a report that I am trying to automate. It contains three
    graphs which are based on three different queries. These three
    queries are based on other tables and queries but have one query in
    common that I use to filter the data for date and machine number. In
    this query, I call a function that is suppose to loop through the
    machine numbers and print out a report for each machine number. The
    reports can easily be generated when I put a specific machine number
    into the common query, but when I try to call the looping function in
    the criteria section of the query I get a run-time error '2486. This
    error happens when you are trying to run a macro or use the DoCmd
    object in VB to carry out an action. However, Access is performing
    another activity that prevents this action from being carried out now.
    Does anyone know of a solution or a workaround? Here is the function:

    Public Function Loopthrumachines()
    Dim CDb As DAO.Database
    Dim rsMachines As DAO.Recordset

    Set CDb = CurrentDb()
    Set rsMachines = CDb.OpenRecordset("qryMachine")
    If rsMachines.EOF = False Then
    Do Until rsMachines.EOF
    DoCmd.OpenReport "SummarybyCell_noDetail", , ,
    "[Machine]=_'" & rsMachines!Machine & "'"
    End If
    End Function

    Thank you.

    Chris Fredericks

  2. #2
    Join Date
    May 2002


    even I am getting this run time 2486 error when trying to run a macro from vb application. It would be of great help to hear from some on this error.
    Thanks in advance

  3. #3
    Join Date
    Jun 2002
    I'm also receiving this message. Clicking "End" does not seem to stop the code and I cannot close any open reports and forms.

  4. #4
    Join Date
    Sep 2002
    I am also having problems running a query via VB...

    Does anyone have any ideas...?

    Is there any way to make your application think that it's where the application is held - i.e. in the form of an "Activate" switch...?


Posting Permissions

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