Drop Down Issues

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Carolyn

    #1

    Drop Down Issues

    I am new to using Access and am trying to populate a listbox based on
    another listbox. My first box has the name of various customers. I
    have another listbox that populates the service location. This works
    fine most of the time. The problem is, one of the customers has
    multiple sites. I am not allowed to write over the service location
    and do not want to list the customer more than once in the customer
    box. Does someone have a way to help me with this problem?

    Thanks,
    Carolyn

  • Phil Stanton

    #2
    Re: Drop Down Issues

    Can you confirm that you have 1 table containing at least

    CustomerID
    CusName

    and a second table containing at least
    AddressID
    AddLine1
    AddLine2
    AddLine3
    Town
    County
    PostCode
    CustomerID
    & probably HeadOffice (True or false)

    If so not too difficult

    "Carolyn" <carolyn.evans@ nscorp.comwrote in message
    news:1175616786 .516149.268020@ l77g2000hsb.goo glegroups.com.. .
    >I am new to using Access and am trying to populate a listbox based on
    another listbox. My first box has the name of various customers. I
    have another listbox that populates the service location. This works
    fine most of the time. The problem is, one of the customers has
    multiple sites. I am not allowed to write over the service location
    and do not want to list the customer more than once in the customer
    box. Does someone have a way to help me with this problem?
    >
    Thanks,
    Carolyn
    >

    Comment

    • Carolyn

      #3
      Re: Drop Down Issues

      On Apr 4, 10:29 am, "Phil Stanton" <p...@stantonfa mily.co.ukwrote :
      Can you confirm that you have 1 table containing at least
      >
      CustomerID
      CusName
      >
      and a second table containing at least
      AddressID
      AddLine1
      AddLine2
      AddLine3
      Town
      County
      PostCode
      CustomerID
      & probably HeadOffice (True or false)
      >
      If so not too difficult
      >
      "Carolyn" <carolyn.ev...@ nscorp.comwrote in message
      >
      news:1175616786 .516149.268020@ l77g2000hsb.goo glegroups.com.. .
      >
      >
      >
      I am new to usingAccessand am trying to populate a listbox based on
      another listbox. My first box has the name of various customers. I
      have another listbox that populates the service location. This works
      fine most of the time. The problem is, one of the customers has
      multiple sites. I am not allowed towriteoverthe service location
      and do not want to list the customer more than once in the customer
      box. Does someone have a way to help me with this problem?
      >
      Thanks,
      Carolyn- Hide quoted text -
      >
      - Show quoted text -
      Yes. I do have 2 tables that contain that information.

      Comment

      • Phil Stanton

        #4
        Re: Drop Down Issues

        So the first combo box should have the record source SELECT CusName,
        CustomerID FROM Customer ORDER BY CustomerName
        2 Columns widths say 3cm, 0cm , Bound Column 2 Name CusIDRelay, Not Bound

        Assuming the form is based on a query based on the 2 tables (I assume you
        have set up a relationship between them) then you need an Event On Update
        Sub CusIDRelay_Afte rUpdate()
        DoCmd.GoToContr ol "CustomerID "
        DoCmd.FindRecor d CusIDRelay
        End Sub

        The second ComboBox should have the recordsource something like

        SELECT AddLine1, Town, AddressID
        FROM Address
        WHERE CustomerID = forms!Customer! CustomerID
        ORDER BY AddLine1;

        3 Columns widths say 3cm, 3cm, 0cm , Bound Column 3 Name AddIDRelay, again
        not bound

        similar bit of code

        Sub AddIDRelay_Afte rUpdate()
        DoCmd.GoToContr ol "AddressID"
        DoCmd.FindRecor d AddIDRelay
        End Sub

        Hope this helps

        Phil

        "Carolyn" <carolyn.evans@ nscorp.comwrote in message
        news:1176724158 .052525.63720@o 5g2000hsb.googl egroups.com...
        On Apr 4, 10:29 am, "Phil Stanton" <p...@stantonfa mily.co.ukwrote :
        >Can you confirm that you have 1 table containing at least
        >>
        >CustomerID
        >CusName
        >>
        >and a second table containing at least
        >AddressID
        >AddLine1
        >AddLine2
        >AddLine3
        >Town
        >County
        >PostCode
        >CustomerID
        >& probably HeadOffice (True or false)
        >>
        >If so not too difficult
        >>
        >"Carolyn" <carolyn.ev...@ nscorp.comwrote in message
        >>
        >news:117561678 6.516149.268020 @l77g2000hsb.go oglegroups.com. ..
        >>
        >>
        >>
        >I am new to usingAccessand am trying to populate a listbox based on
        another listbox. My first box has the name of various customers. I
        have another listbox that populates the service location. This works
        fine most of the time. The problem is, one of the customers has
        multiple sites. I am not allowed towriteoverthe service location
        and do not want to list the customer more than once in the customer
        box. Does someone have a way to help me with this problem?
        >>
        Thanks,
        Carolyn- Hide quoted text -
        >>
        >- Show quoted text -
        >
        Yes. I do have 2 tables that contain that information.
        >

        Comment

        Working...