Results 1 to 4 of 4

Thread: Combo Box

  1. #1
    Join Date
    Jul 2011

    Red face Unanswered: Combo Box

    I have a master form and sub form with the master and child set.
    There is a customer database and a bookings database with a one to many relationship.
    Both have "Customer Name" in the relationship.
    If I create a combobox in the subform in the phone field and I want to be able to select only the relevant data related to "Customer name" on the master form?
    At the moment the combobox shows all of the phone numbers for all of the customers :-(
    I am new at this so be gentle

  2. #2
    Join Date
    Jun 2011
    Inside your mind
    Sounds to me that you need to specify the row source of the combo box to only show the results you want.

    I can give you some SQL code if you can tell me the table names, field names and what exactly you want to be shown (by indicating it on your table diagrams a * for what you want to be shown, or something similar).

    So for example:

    aField name | aField name 2 | aField name 3*
     some value |  some value   |  some value
    Also, let me know exactly where the relationship is, and why it exists... I'm assuming you're user will input a piece of data, which is then looked up on another table, using the primary/foreign key.

  3. #3
    Join Date
    Jul 2011


    Table name Customers
    Field names
    Customer Name | more fields but not phone.
    Table Name Bookings
    Customer Name | Phone

    The subform is to take new bookings for a dispatch operator.
    I have only shown the phone field at this time to keep things simple.
    The subform correctly shows only data related to the customer name on the master form but if I put a combo box on the subform it shows all of the phone numbers in thd bookings database and not just the ones related to the current customer on the master form.
    I have set up a one to many relations shipt from Customers Table to Bookings table as I thought it was required but I may be wrong.
    I have other fields that I will be using in the bookings table but the basic principle I want is the same for those fields.

    Thanks for your help in advance

  4. #4
    Join Date
    Jul 2011
    I forgot to mention the subform is based on a combo box selection for the "customer name" on the master form.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts