Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Location
    Gainesville, FL
    Posts
    2

    Unanswered: Run Query Based On User Input (Newbie Question)

    Hello,

    I am fairly new to database design (I took and completed a class last semester) and am currently working on a design for a silent auction. I ran the database design past my professor, and he said it looked great, but I'm running into some issues when trying to figure out the best way to run querys.

    Basically, I think it just comes down to my inexperience with forms and reports, but let me explain what I am trying to do:

    As the auction ends, I have to be able to insert information into the database relatively easy, and there are people who are not familiar with SQL operating the system. I am looking for a way to use user inputted values (The Item_ID, Bidder_ID, and Final Price) into a table. Is there a way to do this with forms?

    Secondly, I am looking for a way to query the database for all the items bought by a particular bidder. I know how to write a query like this for SQL, but was hoping that there would be a way to specify in a form (using an input box of some sort) which User I am looking for results from.

    I'm not sure how clear this will be, so let me explain with an example.

    Let's say that there are 3 bidders, 1, 2, and 3, along with 5 items: 1,2,3,4,5. Items 1-3 are bought by bidder 1. Item 4 is bought by bidder 2, and Item 5 is bought by bidder 3. I am looking for a form that a user can enter the bidder_ID (for example, 1) and it will bring up the items that they bought (1-3).

    If you would like me to send you a copy of the database, I am more than happy to do so.

    Thanks for the help!

    Regards,

    Michael

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    For your first question, simply assign the RecordSource property of the form to the table you want to update.

    For your second question, have a look at these:
    Forms: Use Variables in SQL behind forms
    Forms: Use Multi-Select List boxes as query parameters

    Have a nice day!

  3. #3
    Join Date
    Mar 2009
    Location
    Gainesville, FL
    Posts
    2
    Sinndho,

    Thanks so much for the reply. That helps tremendously. I will post again if I have any problems.

    Regards,

    Michael

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •