Results 1 to 2 of 2

Thread: Double Command

  1. #1
    Join Date
    Jan 2004
    Posts
    44

    Unanswered: Double Command

    This might be commond, but is it possible for me to assign two commands to the "On Click" event for a button?

    First I would like to run a query and then have the form close.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Ummm... yeah...

    You can code as much as you want into an on click event. Are you using a macro or vba? If it's a macro, just keep adding lines to the macro. If it's vba, add DoCmd.close after the sql is executed.

    Edit: To clarify, the "On Click" event is only a trigger. You can have as many "commands" as you would like within the "trigger". All that really happens when you put stuff in the onclick event is whenever the button is clicked, it will go through ALL the code that you have written within that event or "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
  •