A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo Box entry for query problem



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old December 6th, 2006, 02:00 PM posted to microsoft.public.access.forms
hursty
external usenet poster
 
Posts: 18
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.