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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Continous forms and listbox

Status
Not open for further replies.

airtabaki

Technical User
Aug 7, 2003
31
BE
I've got a table "Person" with the data of a person: Every person has a first name and a last name (2 primary keys of that table)
Then I have a bound table "Project" where each project is specified. It has 2 bound fields, "responable project first name" and "responsable project last name". Each person is responsable for one or more projects.
Now I have a continous form "Project". I have created 2 listbox for the name of the responsable. First you have a list with all the last names of the responsables. When this is specified, the list of first names is filtered, like this

Private Sub last_name_AfterUpdate()
first_name.RowSource = "SELECT first_name FROM person WHERE (((person.last_name)=" & "'" & Me![last name].Value & "'" & "));"
End Sub

Now my problem ... when the last_name list is updated, the first_name list of all the records gets the rowsource of the selected rowsource
 
Why not use only one combo with 2 columns (last_name and first_name) ?
Anyway you may take a look at the ReQuery method.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top