Results 1 to 2 of 2
  1. #1
    lpkorn423 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    12

    Can "criteria" be an entered parameter?

    I have a query to populate all orders that include a specified PartNumber.

    Right now I have the criteria set on PartNumber to only include values equal to the value selected in a corresponding form. For example: [Forms]![Form 2 "Parts"]![PartNumber]. This suits my purpose, but I'd rather not have to manually enter the [PartNumber] value or have the corresponding form opened to the record of the [PartNumber]. Is it possible to have a drop down menu in the dialogue box when the query is run?

    The issue is that we have a lot of part numbers that don't have a standard format.
    For example: One part ID is GTM-99999-B. This part is also sometimes identified as GTM99999-B or GTM-99999 Mk-B by our customers in PO's. This can cause error when manually entering the text as opposed to typing the first few characters "GTM" and then finding the corresponding PartNumber GTM-99999-B.

    Any help you experts want to give to a newbie will be greatly appreciated.

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Create a query of all your possible part numbers. This can be done pretty easily from the table holding all your data, i.e. something like
    Code:
    SELECT DISTINCT PartNumber
    FROM MyTable
    ORDER BY 1
    You will obviously need to change the field and table names to match your database, but this will list each part you have exactly once and place it in alphabetical order.

    Then, if you make your Part Number field on your Form a Combo Box, you can use the Query created above as the Control Source of this Combo Box. So then your users can just select the value in your Part Number field from a list instead of having to type it in.

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

Similar Threads

  1. Replies: 3
    Last Post: 06-29-2012, 08:54 AM
  2. Replies: 1
    Last Post: 04-25-2012, 10:36 AM
  3. Passing criteria "NULL" or "IS NOT NULL" to a query
    By SgtSaunders69 in forum Forms
    Replies: 1
    Last Post: 12-24-2011, 02:22 AM
  4. Replies: 13
    Last Post: 12-05-2011, 05:10 AM
  5. Replies: 8
    Last Post: 11-12-2010, 10:55 AM

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