I have a form/subform based on querys. The query which the form is based on has 4 tables attached, with all related relationships. I have two combo box's pulling their information from tblInvoiceNumber: "WeekEndingDateShown" and "JobNumber" through the query.
What I need to accomplish is, after selecting the correct "WeekEndingDateShown" from the combo Box, it populates the "JobNumber"'s that correspond to the date selection. I also want to eliminate the multiple instances of a date in the date combo box.
I found a segment of code on the net:
SELECT distinct tblInvoiceNumber.JobNumber FROM tblInvoiceNumber WHERE (((tblInvoiceNumber.WeekEndingDate)=[forms]![frmInvoice]![WeekEndingDate])) UNION select distinct null, null FROM tblInvoiceNumber
ORDER BY tblInvoiceNumber.JobNumber;
While playing with that (had to remove the UNION part), I got it "partially" working, but far from desirable results. If anybody knows how to fix this problem, I would grealy appreciate some assistance.
What I need to accomplish is, after selecting the correct "WeekEndingDateShown" from the combo Box, it populates the "JobNumber"'s that correspond to the date selection. I also want to eliminate the multiple instances of a date in the date combo box.
I found a segment of code on the net:
SELECT distinct tblInvoiceNumber.JobNumber FROM tblInvoiceNumber WHERE (((tblInvoiceNumber.WeekEndingDate)=[forms]![frmInvoice]![WeekEndingDate])) UNION select distinct null, null FROM tblInvoiceNumber
ORDER BY tblInvoiceNumber.JobNumber;
While playing with that (had to remove the UNION part), I got it "partially" working, but far from desirable results. If anybody knows how to fix this problem, I would grealy appreciate some assistance.