J
John Ortt
I have written the query two work out flexi time at work. The SQL code is
shown at the bottom of this e-mail. The query refferences two fields within
itself for the final field. The query runs and displays the correct result,
but two prompts appear asking for the value of FCPNew and FCNew. If you
just press return each time the query works correctly and displays the data
(I have included an example at the bottom of the page.)
Could anybody explain how to get rid of the prompt boxes please.
Thankyou,
John Ortt
SELECT [Q
ates].Date, (select last(FlexiBalance) from [T:Flexi] where
[Q
ates].[Date]>=[T:Flexi].[Date]) AS LFB, (select last([Date]) from
[T:Flexi] where [Q
ates].[Date]>=[T:Flexi].[Date]) AS LFD, CDate(nz((select
sum((FC)) from [Q:Times] where [Q
ates].[Date]=[Q:Times].[Date]))) AS
FCNew, CDate(nz((select (FCP) from [Q:Times] where
[Q
ates].[Date]=[Q:Times].[Date]))) AS FCPNew, IIf(Left([FCPNew],1)=0 Or
Left([FCPNew],1)=3,"","-") & Left([FCNew],5) AS FC
FROM [Q:Times] RIGHT JOIN ([T:Flexi] RIGHT JOIN [Q
ates] ON [T:Flexi].Date
= [Q
ates].Date) ON [Q:Times].Date = [Q
ates].Date
GROUP BY [Q
ates].Date, IIf(Left([FCPNew],1)=0 Or
Left([FCPNew],1)=3,"","-") & Left([FCNew],5);
Date LFB LFD FCNew FCPNew FC
11/08/02 -01.48 11/08/02 00:00 0.00 00:00
10/08/03 -07.55 10/08/03 00:00 0.00 00:00
11/08/03 -07.55 10/08/03 00:34 1.00 00:34
12/08/03 -07.55 10/08/03 00:00 1.00 00:00
13/08/03 -07.55 10/08/03 07:24 -1.00 -07:24
05/01/04 -05.44 05/01/04 02:24 1.00 02:24
06/01/04 -05.44 05/01/04 00:01 -1.00 -00:01
07/01/04 -05.44 05/01/04 02:24 1.00 02:24
08/01/04 -05.44 05/01/04 01:51 1.00 01:51
shown at the bottom of this e-mail. The query refferences two fields within
itself for the final field. The query runs and displays the correct result,
but two prompts appear asking for the value of FCPNew and FCNew. If you
just press return each time the query works correctly and displays the data
(I have included an example at the bottom of the page.)
Could anybody explain how to get rid of the prompt boxes please.
Thankyou,
John Ortt
SELECT [Q

[Q

[T:Flexi] where [Q

sum((FC)) from [Q:Times] where [Q

FCNew, CDate(nz((select (FCP) from [Q:Times] where
[Q

Left([FCPNew],1)=3,"","-") & Left([FCNew],5) AS FC
FROM [Q:Times] RIGHT JOIN ([T:Flexi] RIGHT JOIN [Q

= [Q


GROUP BY [Q

Left([FCPNew],1)=3,"","-") & Left([FCNew],5);
Date LFB LFD FCNew FCPNew FC
11/08/02 -01.48 11/08/02 00:00 0.00 00:00
10/08/03 -07.55 10/08/03 00:00 0.00 00:00
11/08/03 -07.55 10/08/03 00:34 1.00 00:34
12/08/03 -07.55 10/08/03 00:00 1.00 00:00
13/08/03 -07.55 10/08/03 07:24 -1.00 -07:24
05/01/04 -05.44 05/01/04 02:24 1.00 02:24
06/01/04 -05.44 05/01/04 00:01 -1.00 -00:01
07/01/04 -05.44 05/01/04 02:24 1.00 02:24
08/01/04 -05.44 05/01/04 01:51 1.00 01:51