Results 1 to 6 of 6
  1. #1
    hinsdale1 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Apr 2013
    Posts
    63

    List box of selections for parameter input box?

    I have a form (based on a query) that asks users to input a minimum rating (0-99) in order to generate appropriate record results and fill the form.



    I would like the parameter input box to instead of asking for a number, to offer the user a list (dropdowm maybe?) of available selections (97 A+'s only, 90 A's, 80 B's and above, 70 C's and above, 0 Include all)

    I sort of remember reading a post somewhere that i can create some sort of list box in a form somewhere and replace the [minimum rating] input variable on the QUERY? with some form!xxxxx.xxxx reference to the list box but cant find the post now and it's all a bit above my pay-grade.

    Any suggestions as to if and how this might be accomplished would be greatly appreciated.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    hinsdale1 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Apr 2013
    Posts
    63
    Thank you for your reply. Unfortunately the content of the link u provide is pretty challenging for me (first time user and my brain is hurting trying to grasp the mechanics of relationship databases, forms, subforms, and the syntax requirement in vba, access). I tend to do better with a little more dumb downed instruction - or at least pointed in the right direction and then I will just try endless combinations until i get it to work .

    I would be grateful if someone might spell it out for me a little more..Like

    1) create an XYZ type box on the ABC form (with these requirements).
    2) replace the [enter rating] variable in the criteria of the underlying query with xxxxxxxxxxxxx.

    Not looking to have it done for me but a little more direction is needed to get into my pay grade of understanding

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,630
    A combobox or listbox can present a list of choices. The list is built by setting the RowSource property. This can be a query or a static list. Also requires to set the RowSourceType property. For static list review http://www.techonthenet.com/access/c...value_list.php.

    Then reference the control in query with: Forms!formname!controlname - however, if the control is on a subform the reference gets more complex - link provided by Paul has more variations.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    hinsdale1 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Apr 2013
    Posts
    63
    Brilliant... thanks as usual June7, your a scholar and a gentle(wo)man.

    Unfortunately, i cant quite seem to get it to work. I am not quite sure what the "controlname" part is supposed to reference.. just the name of the combo box? (Forms!frmQuery11!combo1) or does it need to reference the rowsource or control?

    I am brain fried - tired but will try again tomorrow. Thanks again.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,630
    It would be the name of the combo or list box. What you show looks right.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Copy list box selections to another list box
    By Gotham_Knight in forum Forms
    Replies: 1
    Last Post: 03-07-2013, 10:40 AM
  2. Replies: 1
    Last Post: 01-28-2013, 10:55 PM
  3. List Box Selections
    By MJeanBap in forum Forms
    Replies: 10
    Last Post: 04-05-2012, 06:26 AM
  4. Multiple Selections from a List Box
    By oleBucky in forum Forms
    Replies: 4
    Last Post: 05-06-2011, 08:24 AM
  5. Clear selections from a List Box?
    By Dreams2Fly in forum Forms
    Replies: 3
    Last Post: 03-28-2011, 02:25 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