Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2004
    Posts
    20

    Unanswered: How to control running of macros?

    Hi folks!

    I would like macros to be run from forms only and not in another way (e.g. by double-clicking them). Is there any idea how to do that?

    Regards!
    BoHr

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    convert them to vb, hard code them into your forms.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Dec 2004
    Posts
    20
    Hi Teddy!

    Thank you very much for your reply! I tried this:

    Private Sub cBut_Click()
    DoCmd.RunMacro "MacroName"
    End Sub

    but I can still do with macro what I want to be done via form only. Forms have events but I have no idea what to do with macros. Could you, please, write some code or more details in case this what I did is not what you meant? Thanks a lot again!

    Regards!
    BoHr

  4. #4
    Join Date
    Sep 2004
    Location
    Tampa, FL
    Posts
    520
    Taking a guess Teddy meant to get rid of the macros altogether and use VBA instead of the macro, not to trigger the macrovia code.
    Darasen

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Ayup, key words being convert them to vb
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  6. #6
    Join Date
    Dec 2004
    Posts
    20
    Everything's clear! Thank you very much Darasen and Teddy!

    Big regards to both of you!
    BoHr

Posting Permissions

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