Results 1 to 4 of 4

Thread: macro

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2010
    Posts
    23

    Talking macro

    Does anyone know how to click a button in a form using a macro, i want the macro to run the filter button I've set up but cant find the section in the macro that would allow me to do this?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: macro

    Take the code in the button's click event and make it into a Sub routine and have the macro run the Sub.

  3. #3
    Lively Member tarius222000's Avatar
    Join Date
    Jul 2005
    Location
    Jacksonville, FL
    Posts
    80

    Re: macro

    when viewing the form in edit mode, double click on the command button. you should get where you can insert code. the subroutine should be title as such.
    Code:
    Private Sub CommandButton1_Click()
    if you don't see the click then you did it wrong.

    if you are then trying to use another button in the same form to run the click event, then just type it out as
    Code:
    Call CommandButton1_Click()
    Last edited by tarius222000; Mar 18th, 2010 at 12:29 PM. Reason: more info

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2010
    Posts
    23

    Re: macro

    thats brilliant thanks again for your help guys, thumbs up to your eclectic knowledge on a database front!

Posting Permissions

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



Click Here to Expand Forum to Full Width