Results 1 to 2 of 2

Thread: DoCmd. RunMacro

  1. #1
    Join Date
    Aug 2004
    Location
    NY
    Posts
    113

    Unanswered: DoCmd. RunMacro

    Hi, I am trying to DoCmd.RunMacro, that will output a query into an Excel spreadsheet when the user selects the option button and selects the Command button

    Code:
          
            Case 1
    ........
            Case 2
    .......
            Case 3
    .......
            Case 4
    DoCmd.OpenReport "rptTypeConcernSort", acViewPreview, , CriteriaStrg
    .......
            Case 5
    DoCmd.RunMacro ("Macro1")
    How can I filter for my Macro in case 5, like a filter done on Case 4 for a report?

    I have a data range on the form, however for the Case5 it is non existent?

    Thank you,
    ======================
    Levent
    Access 3

  2. #2
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634
    You would need to either filter within the macro or use VBA to accomplish what the macro is currently doing.

Posting Permissions

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