Results 1 to 7 of 7
  1. #1
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    Combo Box control source?

    What is the deal with building a combo box on a form? The form has a record source.



    When I build the combo box, I choose a query to base it on that specifically selects or organizes the data the way that I want.

    It works. Now when I am formatting this combo box on the form, I notice it has no control source? Since the combo was based on a query
    this makes no sense; but no control source at all? Would not the control source for the combo box be the original query the combo box was based on?

    I could put in another control source, but that is does not seem a good idea.

    I use the combo box wizard to create the combo box and as I said, I base it on a query not a table the query is more specific for my needs.

    But when it is placed on the form and formatted, I notice that there I no control source.

    When on the form what should the control source be?

    The form of course has it own record source.

    Any help appreciated. Thanks in advance.

    Respectfully,

    Lou Reed

    I could use the table the query was based on, but that is not selective of the names that I want - hence the query.

  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,518
    You're confusing row source and control source. The row source is your query. That's where the combo gets its selections. The control source is which field it should store the selected value in. That would be a field in the form's record source. The wizard should have asked about storing the value, and presumably you didn't specify.

    More simply put, the row source is where to get selections, the control source is where to store the selected value.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Okay, but as I said when I copied and pasted the combo box (which I created on another form and based it on a query) when I went to format it, the control source was blank. Now it might have been that way on the original form. I cannot be sure.

    So the query is the row source not the query is the control source?

    Any help appreciated. Thanks in advance. I will try what you said.

    Respectfully,

    Lou Reed

  4. #4
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Yes, you are correct as I just checked my db. The control source is usually determined by the record source, and that is for the form?

    Respectfully,

    Lou Reed

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I don't recall copy/pasting a combo, but I imagine it wouldn't know which field on the new form it should be bound to, so it might leave it blank. That's just a guess though.

    Let's say I have an invoice form, bound to an invoice table (record source). One field in the table/form would be customer: who the sale was made to. I would have a combo on the invoice form that had a row source getting customers from a customer table, but the control source would be the customer field in the invoice table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Okay, thanks for your input.

    R,

    Lou Reed

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problem.
    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. Combo Box Control Source
    By Beanie_d83 in forum Forms
    Replies: 7
    Last Post: 06-27-2016, 04:03 AM
  2. Replies: 3
    Last Post: 04-27-2016, 01:25 PM
  3. Replies: 6
    Last Post: 05-09-2015, 11:28 AM
  4. Replies: 5
    Last Post: 09-18-2013, 09:15 PM
  5. Replies: 1
    Last Post: 03-30-2013, 12:41 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