MS Access - How do I prompt multiple parameters as user input?

Hey guys!

at work, we're trying to build a database to get an output of all kinds of data from different excel tables (items in stock, sales per week, price, etc) into one table by using the ItemID as primary key for all the tables and as a user input for the queries.

I'm completely new to Access, I do have some experience in Excel and databases in general though. I've linked the tables to each other and sucessfully inplemented different queries. However, I have a few questions that I can't really find a good answer to online:

How can I ask for multiple values when asking for user input? For example: I want the user to be able to put in multiple itemIDs so they can compare sales/week in a table that has multiple rows). I'd assume this probably works best through a form or a report? 

Thank you guys in advance!


2 Answers

  • AJ
    Lv 7
    4 weeks ago
    Favorite Answer

    Yes you would have to create an unbound form and then insert those ids into an sql statement in the backend.

    • Lewis3 weeks agoReport

      I'd ask for one or multiple itemIDs from the user everytime he uses the form. For the queries, I've implemented it by putting in prompt in square brackets "[Please enter IDs:]".

      The only problem I have is that this way only allows one ID to be entered at at a time.Thanks so much for your help!

  • 4 weeks ago

    First, be sure that it's a relational design, no duplicate data other than keys. Next, you need a form for a defined relational view. If you cannot define a view for what you want, that's a clue that the design itself needs revisiting. This is not trivial, but has big payoff. Good luck.

    • Lewis3 weeks agoReport

      For the queries, I've implemented it by putting in a prompt in square brackets "[Please enter IDs:]" when I added the "itemID" field to the query.
      I'd like to be able to enter multiple parameters here, preferably seperated by commas. Is there any way to do that?

      Thank you so much for your help!

Still have questions? Get your answers by asking now.