If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#7
|
|||
|
|||
Combo Box entry for query problem
John,
I finally got it to work. I was using the "All Lines" option in the combo box. I tried what you had and it didn't work. But, I changed it too the "Is Null" option and now things are going my way. Thanks for you help "John Vinson" wrote: On Tue, 5 Dec 2006 14:18:03 -0800, hursty wrote: This one is actually a query of a query of a query. eeep! Try SELECT FPYQueryByDate_STEP1.Date, FPYQueryByDate_STEP1.Line, FPYQueryByDate_STEP1.SumOfNo_of_units_produced, FPYQueryByDate_STEP1.SumOfNo_of_units_repaired, FPYQueryByDate_STEP1.SumOfNo_of_defects, (([SumOfNo_of_units_produced]-[SumOfNo_of_units_repaired])/[SumOfNo_of_units_produced]) AS FPY, ([SumOfNo_of_defects]/[SumOfNo_of_units_produced]) AS DPU FROM FPYQueryByDate_STEP1 WHERE (((FPYQueryByDate_STEP1.Date) Between [forms]![mainform]![startdatebox] And [forms]![mainform]![enddatebox]) AND ((FPYQueryByDate_STEP1.Line)=[Forms]![mainform]![line] OR [Forms]![mainform]![line]="All Units")); This assumes that the BOUND COLUMN of the combo box contains "1", "2", "3" and "All Units" - if the visible column is different from the bound column, open the combo's rowsource query and substitute the value in the bound column for "All Units", or use IS NULL if that field is in fact null in the query. John W. Vinson[MVP] |
Thread Tools | |
Display Modes | |
|
|