Results 1 to 2 of 2
  1. #1
    justphilip2003 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2013
    Location
    Ohio
    Posts
    125

    ComboBox Code Selction for Activation of a field fliter code requesting Query


    Is it possible to use a ComboBox to select a filtering code in an AfterUpdate() EP for a "DoCmd.OpenQuery "qryOpenStockbyWoodType", , acReadOnly"? I wish to feed the Query this filtering code in order to remove the messiness of the MsgBox display and the short comings that the user would know all possibe codes which a Combox can supply. The Query works find. The ComboBox works fin in another form. The issue is how to feed the code to the Query. TIA Phil

  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,521
    Personally I never open a query for the user to view, but you could have a reference to the combo in the appropriate field's criteria. Opening a form or report you could also do this:

    http://www.baldyweb.com/wherecondition.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. replaced query field by using VBA code
    By ice051505 in forum Programming
    Replies: 2
    Last Post: 02-16-2013, 10:25 AM
  2. vba code to reference the combobox
    By asv1988 in forum Access
    Replies: 10
    Last Post: 01-16-2013, 02:21 PM
  3. how i make a query on combobox selction
    By eldarbs in forum Queries
    Replies: 16
    Last Post: 09-21-2012, 05:50 PM
  4. vba code not working with combobox
    By bopsgtir in forum Programming
    Replies: 9
    Last Post: 02-24-2011, 11:27 AM
  5. Code in combobox, code in text box
    By float in forum Forms
    Replies: 3
    Last Post: 09-29-2010, 07:12 AM

Tags for this Thread

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