Results 1 to 2 of 2
  1. #1
    SlowPoke is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Sep 2010
    Posts
    11

    Macro passing a parameter


    I have written a macro that opens a query. This query asks the user to enter a [Parameter]. Once entered the query runs. After query 1 runs I want to open query 2 and using the same [Parameter] entered in query 1 run query 2. Is this possible? I've looked at setting temp variable but it's not obvious to me.

  2. #2
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    705
    I would recommend using a form to collect the parameter value.

    To reference the open form from you query use:

    forms![Your_Form_Name_Here].Your_Control_Name_Here
    Boyd Trimmell aka Hitechcoach
    Database Architect and Problem Solver
    Microsoft MVP - Access Expert
    25+ years specializing in Accounting, Inventory, and CRM systems
    "If technology doesn't work for people, then it doesn't work."

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 10
    Last Post: 09-27-2010, 08:06 PM
  2. Replies: 3
    Last Post: 04-22-2010, 08:52 PM
  3. bypassing passing parameter when null
    By cowboy in forum Queries
    Replies: 11
    Last Post: 04-14-2010, 09:59 PM
  4. Using parameter in autoexec macro
    By lchurch in forum Queries
    Replies: 0
    Last Post: 03-04-2009, 06:22 PM
  5. Passing Values
    By dromorkid in forum Forms
    Replies: 0
    Last Post: 11-25-2008, 05:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums