Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    need help specifying macro condition (97)

    rather than write 2 macros for 2 separate buttons I

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: need help specifying macro condition (97)

    It isn't clear what you're trying to do. Were you trying to pass an argument to a macro? Did you want to do something different for each button? You'd be better off writing code for each button's OnClick event.
    Charlotte

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: need help specifying macro condition (97)

    I basically wanted 1 macro associated with the onClick event of 2 buttons, the problem was the macro must recognize which button was clicked, I had trouble wrapping my head around how to specify a condition that would distinguish between either of buttons & which one was the active one (the one clicked) The condition I specified in my last post was an attempt at making a condition I thought would work but is not acceptable by access.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: need help specifying macro condition (97)

    You can't really do that with a macro. It's easy with code, but macros are highly inflexible. The best you could do would be use Screen.ActiveControl in a condition in the macro to specify the button. In other words, you condition might be Screen.ActiveControl = Forms!MyForm!Button1. If Button1 was the one that called the macro, that condition would evaluate true and the associated actions would execute.
    Charlotte

  5. #5
    4 Star Lounger
    Join Date
    Jun 2001
    Posts
    531
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: need help specifying macro condition (97)

    well I didn

Posting Permissions

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