Hi y'all,
I have been trying to populate a subform combobox with a select query.
I have a main form text box called [JobNumber] and a subform called JobRates, you choose the SSN# from a combobox that populates the rest of the subform (viewed as datasheet). I have another subform called [JobTimeExpenses] that has a combobox where you choose the SSN# again.
My problem is, I would like the [JobTime subform combobox to only show the chosen SSN#'s that equal the ones in the [JobRates] subform. I have managed to get what I want to work some, when I click on the JobTime subform cbo I get the SSN# that is in the JobRates subform, but if I change the JobNumber on the Main form, the JobTime cbo still has the first SSN#. I can press F9 and it works correctly, but I have tried every other requery location to no avail.
Below is my SQL query:
SELECT JobRates.PersonnelID, Personnel.FirstName, Personnel.LastName FROM Personnel INNER JOIN JobRates ON Personnel.PersonnelID = JobRates.PersonnelID WHERE (((JobRates.JobNumber) Like [Forms]![MSR Main]![JobNumber])) ORDER BY JobRates.JobNumber, JobRates.PersonnelID;
Any help would be greatly appreciated.
Thanks
I have been trying to populate a subform combobox with a select query.
I have a main form text box called [JobNumber] and a subform called JobRates, you choose the SSN# from a combobox that populates the rest of the subform (viewed as datasheet). I have another subform called [JobTimeExpenses] that has a combobox where you choose the SSN# again.
My problem is, I would like the [JobTime subform combobox to only show the chosen SSN#'s that equal the ones in the [JobRates] subform. I have managed to get what I want to work some, when I click on the JobTime subform cbo I get the SSN# that is in the JobRates subform, but if I change the JobNumber on the Main form, the JobTime cbo still has the first SSN#. I can press F9 and it works correctly, but I have tried every other requery location to no avail.
Below is my SQL query:
SELECT JobRates.PersonnelID, Personnel.FirstName, Personnel.LastName FROM Personnel INNER JOIN JobRates ON Personnel.PersonnelID = JobRates.PersonnelID WHERE (((JobRates.JobNumber) Like [Forms]![MSR Main]![JobNumber])) ORDER BY JobRates.JobNumber, JobRates.PersonnelID;
Any help would be greatly appreciated.
Thanks