Results 1 to 4 of 4
  1. #1
    TheChrisLV is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    4

    Setting up a Query for feeding combo boxes in multiple forms

    I have the need for several forms in my database to use combo boxes that "feeds" another combo box on the same form. The most commonly used instance is using CompanyName_Combo Box as the criteria for the query Company_People that is used to feed the Employee_Name Combo Box. I use the following in the criteria of the query [Forms]![CompanyF]![C_InteractionF].[form]![CompanyID] and I enter in the correct Requery commands in the event codes to update the combo box. Everything works as intended but there are some issues I keep encountering.

    1) In the set up above the form [C_InteractionF] that contains the combo boxes is a subform of the form [CompanyF]. Whenever I open [C_InteractionF] by its self or try to use it as a sub form in another form I am prompted for the parameter value. How can I avoid this.



    2) Since I use this combo box method many times throughout my database I don't want to have to recreate the supporting query and change the criteria each time for the specific form I am creating I am looking for a way to define a parameter that I can assign values to in event codes that get passed to the query whenever I requery a combo box.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,629
    Don't use parameterized query as combobox RowSource. Use SQL statement in the RowSource.

    SELECT Employee_Name FROM Employees WHERE CompanyID = [cboCompanyID];
    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.

  3. #3
    TheChrisLV is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    4
    THANK YOU SO MUCH....I created a test form and that is exactly what I needed it to do As a quick follow up, what is a good resource for learning SQL

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,629
    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. Replies: 9
    Last Post: 06-04-2014, 10:45 AM
  2. Replies: 17
    Last Post: 03-15-2013, 02:30 PM
  3. Replies: 3
    Last Post: 07-19-2012, 08:00 AM
  4. cascade combo boxes in continous forms
    By storm1954 in forum Forms
    Replies: 3
    Last Post: 05-10-2012, 06:00 AM
  5. cascading combo boxes on Continuous Forms
    By Jerry8989 in forum Forms
    Replies: 0
    Last Post: 10-12-2009, 10:02 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