Automate Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yseifu
    New Member
    • Mar 2010
    • 2

    Automate Query

    I need to create a query in access that will ask me the query name as a parameter from which to get the data field (e.g. Emp_ID. only) . The database is in Microsoft Access and need to automate this task in Access. I don’t know VBA.

    Note: If I need d to build the query with string manipulation where would I put the declare, dim statement in the query?
    I would appreciate any help, hints or suggestions.

    e.g..
    SELECT Emp_ID INTO NewTable
    FROM [Please Enter Query Name]
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    You can do this a number of ways.
    1. You can do this in Access.
    2. You can create a dynamic query and insert the database and table name variables.
    3. You can also create a single query and include the check of variable on the where clause and UNION ALL all query coming in from different sources.

    Good Luck!!!

    ~~ CK

    Comment

    • yseifu
      New Member
      • Mar 2010
      • 2

      #3
      Thanks Ck , but I don't know how to do it in Access I'm new to it.
      Any help appreciated

      Comment

      • ck9663
        Recognized Expert Specialist
        • Jun 2007
        • 2878

        #4
        If you're choosing option 1, you're going to have to post this in Access forum.

        Good Luck!!!

        ~~ CK

        Comment

        Working...