Results 1 to 4 of 4
  1. #1
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    862

    Changing the criteria on the fly in a field

    I have a query [By Field] and its fields are called [Field_ID] and [Field_Name].



    I would like to have a Combobox in a form to select the [Field_ID], that displays the [Field_Name] and run the [By Field Report] with that selected [Field_ID].

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Have you tried
    Using the combobox wizard and make the query the rowsource?

    Make the size of the ID field 0 -so it doesn't display.
    see this for intro and other combobox info

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Options for report:

    1. report Filter property can have an expression that references the combobox

    2. dynamic parameterized query http://www.datapigtechnologies.com/f...mtoreport.html

    3. VBA code that constructs filter criteria and passes it to report when it is opened
    DoCmd.OpenReport "By Field Report", , , "Field_ID=" & Me.comboboxname
    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.

  4. #4
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    862
    Thanks June7. I did it the way shown in the weblink. Works now, but need to start a new thread.

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

Similar Threads

  1. Changing join variables on different criteria
    By ltcarlisle in forum Queries
    Replies: 1
    Last Post: 07-01-2014, 11:56 AM
  2. Changing Query Criteria from Form
    By dvgef2 in forum Queries
    Replies: 4
    Last Post: 06-24-2013, 12:14 PM
  3. Replies: 2
    Last Post: 01-31-2013, 07:44 PM
  4. Changing field types
    By kwooten in forum Access
    Replies: 2
    Last Post: 06-12-2012, 07:40 AM
  5. Changing font color based on criteria
    By Pattie Weaver in forum Reports
    Replies: 5
    Last Post: 11-02-2010, 03:38 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