Run Time Error Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Don

    #1

    Run Time Error Question

    I have a form that uses an Image object to open a report (the report is
    based on a query). I used the image object because the MS command buttons
    are dull looking. All of this works well. The problem occurs if I choose
    to cancel when the "enter parameter box" appears. The query prompts for two
    inputs, name, then start date and end date (I guess that's three prompts).
    When I click cancel I get the "Run Time Error 2501 The Open Report Action
    Was Canceled". What do I need to do to stop this?

    While I'm asking questions I'd like to ask another. I'm trying to add a
    calendar to this form, in particular to this action. When I click on this
    Image object the prompts come up asking for name then start date then end
    date. How can I attach a calendar to this action? I've tried several
    calendars but haven't gotten anywhere. I had used Allen Browne's calendar
    in another db but I can't make it work in this one, I think because I'm
    using an image object. to open a report.

    Thanks again,
    Don...........


  • Br@dley

    #2
    Re: Run Time Error Question

    Don wrote:[color=blue]
    > I have a form that uses an Image object to open a report (the report
    > is based on a query). I used the image object because the MS command
    > buttons are dull looking. All of this works well. The problem
    > occurs if I choose to cancel when the "enter parameter box" appears.
    > The query prompts for two inputs, name, then start date and end date
    > (I guess that's three prompts). When I click cancel I get the "Run
    > Time Error 2501 The Open Report Action Was Canceled". What do I need
    > to do to stop this?[/color]

    It's a valid error message. To not see it you'd need to put in your own
    error routines.

    eg.

    On error goto myFunction_err

    .....

    myFunction_Exit :
    End Sub
    myFunction_err:
    MsgBox Err.Description , 48, "Error in myFunction ' comment out to not
    show message
    resume myFunction_Exit



    <>

    --
    regards,

    Bradley

    A Christian Response



    Comment

    Working...