access criteria

J

jim

when selecting a last name how do i get a pull-down of only the first names
that are associated with that particular last name

ie pick smith from data and then show all the first names that last name as
smith in a form using criteria or what ever
 
F

fredg

when selecting a last name how do i get a pull-down of only the first names
that are associated with that particular last name

ie pick smith from data and then show all the first names that last name as
smith in a form using criteria or what ever

Here is one way:
Leave the rowsource of the first name combo box blank.

Code the LastName combo box's AfterUpdate event:

Me![ComboFirstName].Rowsource = "Select TableName.[FirstName] From
TableName Where TableName.[ComboLastName] = """ & Me.[ComboLastName] &
""" Order by YourTable.[FirstName];"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top