Results 1 to 4 of 4
  1. #1
    cmany is offline Novice
    Windows 8 Access 2013 32bit
    Join Date
    Aug 2018
    Posts
    1

    Prompt for table to be run in query

    I am needing to be able to prompt the user the select a table to use in a query. Data will be imported via excel monthly, and the queries to separate the data into separate tables will need to be adjusted to accommodate the newly imported table.

    So there is a July table with customer, order and product information, which all needs to be separated. The queries to do this will be the same each month, I just need to change the table in each query quickly.

    It has been a number of years since having to do anything like this, and things are far different from what they used to be.

    Is there a simple solution that I just may not be seeing???

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    you shouldnt be asking for tables. All the data should be in 1 table and you prompt for what date.

  3. #3
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Quote Originally Posted by cmany View Post
    <snip> So there is a July table with customer, order and product information, which all needs to be separated. The queries to do this will be the same each month, I just need to change the table in each query quickly.
    <snip>
    These statements indicate to me that you do not have a normalized table design/structure.

    Maybe you could explain more about what the business is/does. Post a jpg of the table relationships/structures.

    Having a table for each month of the year would be next to impossible to design forms and reports.

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    Need details.
    So each month the import routine creates tables in an access db. The created tables have different names each month.
    The newly imported table records need to be added via append queries to existing permanent tables in the DB.
    The problem is adjusting the queries to accommodate the new input table names each month.
    Any other special cases, requirements, pitfalls?

    OK. How are you modifying the queries now? How are you running the queries now? How many queries are involved?
    How do you envision the automated solution to work? With a form to enter the table names and a button to fire off the queries, or what?
    Have you considered renaming the newly imported tables to a constant name so that the queries don't need modification each month?

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

Similar Threads

  1. Strange Prompt When Opening Table
    By Paul H in forum Access
    Replies: 1
    Last Post: 08-01-2016, 02:50 PM
  2. prompt for between dates in a query
    By LaughingBull in forum Access
    Replies: 3
    Last Post: 07-27-2015, 03:51 PM
  3. Replies: 5
    Last Post: 08-03-2012, 08:15 AM
  4. Prompt for a table.
    By kmcg1888 in forum Queries
    Replies: 1
    Last Post: 02-10-2012, 08:10 AM
  5. continuous prompt for credentials when opening mysql table
    By ajetrumpet in forum Import/Export Data
    Replies: 0
    Last Post: 10-30-2010, 11:52 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