Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009

    Red face Unanswered: Form: can I make the contents of a combo dependent on a previouse combo?

    Using Access 2007. I have a form that has a couple of combo boxes. The first combo contains a list of the jobs in process by the company. The second combo contains all of the purchase orders for all of the jobs. My issue is that I want the second combo box to display only the purchase orders for the job (number) selected in the first combo box. Both of the tables (job and purchase order) have the job number. I am new to Access 2007 and have not written any code yet. TIA.
    Last edited by dcsmith1076; 04-03-09 at 03:12.

  2. #2
    Join Date
    Mar 2009
    Provided Answers: 15
    Yes you can.

    On the AfterUpdate event of the first combo (the "master" combo) write some code to change the RowSource property of the second combo (the "slave" combo) then requery it, like this:
    Private Sub Combo_Master_AfterUpdate()
        Me.Combo_Slave.RowSource = .....
    End Sub
    Have a nice day!

  3. #3
    Join Date
    Sep 2006
    Your PO combibox rowsource should look like:

    "SELECT PurchaseOrders.[PO_ID] ... FROM PurchaseOrders WHERE PurchaseOrders.[Job_ID]= " & .[Job] & " ORDER BY PurchaseOrders.[PO_ID];"
    Either on Job combi AfterUpdate or combi PO OnEnter do a Requery on PO.


Posting Permissions

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