Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2001
    Location
    Kansas
    Posts
    4

    Unhappy Unanswered: Lookup type functions.

    For simplicity sake:

    I have 1 table (A) with two fields. Boss & Secretary.
    I have 1 table (B) with many fields, including Boss & Secretary.

    I've created a Form to modify Table B. On the form, I created a Drop Down list from which I can choose the name of a Boss from Table A (field is actually linked to table A).

    What I want is for the secretary field on the Form (used to modify table B) to auto-populate based on the selection I make in the Boss field.

    I'm basically wanting to choose an item in one field and then have the other fields auto-populate based on the choice I made and it's corresponding data in a second table.

    I toyed around with Dlookup but I'm not exactly an expert.

    Any help is appreciated.

    Jason

  2. #2
    Join Date
    Nov 2001
    Posts
    336
    Suppose you have comboboxes cboBoss and cboSecretary. Then in afterupdate event for cboBoss put following code.

    cboSecretary.Rowsource = "Select Secretaty From tblA Where Boss='" & me.cboBoss & "';"

    HTH

Posting Permissions

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