Changing rowsource based on lookup field

AdamAA

Registered User.
Local time
Today, 14:45
Joined
Aug 18, 2012
Messages
24
I have a table with First Name, Last Name and Current Position columns.

I have a second table with a First Name lookup to the first table, but also other columns like 'Time on Shift', 'Time off Shift', and 'Overtime'

(I know lookups are bad, but these are tables from Sharepoint and it's an established system I can't really get away from).

The second table sits in a Continuous Form, but I only want the First Name field to list people that are in the Current Position I specify with a combobox at the top of the form.

I know how to change the row source manually:
Code:
SELECT [Sub Contractors Table].ID, [Sub Contractors Table].[First Name], [Sub Contractors Table].Surname FROM [Sub Contractors Table] WHERE (([Sub Contractors Table]![Current Position]="******")) ORDER BY [Sub Contractors Table].[First Name];

But I would like to change '******' based on what I select in the combobox. I'mj just not sure how to do this programatically.

Thanks in advance!
 

Users who are viewing this thread

Back
Top Bottom