Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Values in a field list from another

Status
Not open for further replies.

digitalbits

Technical User
Mar 16, 2001
1
0
0
AU
hey,
I am trying to create an inteface so that the user can click on a value in the first field list. This value is then used in the criteria of a query to produce the second field list beside the first.
eg. User can click on a subject, (1 of 10 option) and the field list beside the first will provide the availible teachers for that subject, based on what is availible from a query.
thanks,
Daniel
 
In the 1st control's afterUpdate event change the second control's rowSource so that the query will only select the records you want and then requery the second control.
Code:
Private Sub FirstList_AfterUpdate()
    Me.TeacherList.RowSource = _
        "SELECT Teacher From MyFile " _
        & " WHERE FieldThatFeeds1stList = " & Me.FirstList
    Me.TeacherList.Requery
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top