MS Access 2003/VB question

Discussion in 'OT Technology' started by beez, Jan 25, 2006.

  1. beez

    beez New Member

    Joined:
    Jun 3, 2004
    Messages:
    19,143
    Likes Received:
    0
    Location:
    Queens
    I'm currently working on a database with a form for users to use to search the db. I intially did it up with a simple macro call from the search button. I would like to add error checking to this (i.e. if all search fields are blank, pop up an error window).

    I wrote up a little event procedure that does this checking but I can't figure out how to get the macro to run. I tried adding DoCmd.RunMacro("SearchMacro") where SearchMacro is the name of the one I created in the db after the error checking. I keep getting runtime error 2502 "The action or method requires a Macro Name argument". Being that I have the name of my macro in there I'm confused. My first guess is that I somehow need to create a macro in the VB codespace but I am not sure how to go about doing so.

    Please help :hs:
     
  2. beez

    beez New Member

    Joined:
    Jun 3, 2004
    Messages:
    19,143
    Likes Received:
    0
    Location:
    Queens
    Nevermind. I just put the error checking in OnEnter.
     

Share This Page