completing a query

Hello everybody. I have this query which works fine. It takes its parameters 
(date from - date to - reasons) from a form. This works also fine. I 
sometimes need to be able to see all the reasons "causali" between specific 
dates. I would like to know if and how that is possible by just leaving the 
"causali" combobox empty. Of course any other suggestion is more than 
welcome

Thanks

-- 
Lisa
Save the Dogs Onlus - www.savethedogs.eu

Aiutaci a costruire il nuovo rifugio, dona il 5 per mille a Save The Dogs  : 
97394230151 


0
Lisa
3/2/2008 10:45:47 AM
access.queries 6343 articles. 1 followers. Follow

10 Replies
1063 Views

Similar Articles

[PageSpeed] 4

Lisa

If your query needs to display the "causali", you'll first need to make sure
it is set to do that, not just use it as a selection criteria/parameter.

Or are  you trying to do two separate queries?

-- 
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

"Lisa" <Lisa@savethedogs.it> wrote in message
news:mBvyj.1913$q53.828@tornado.fastwebnet.it...
> Hello everybody. I have this query which works fine. It takes its
parameters
> (date from - date to - reasons) from a form. This works also fine. I
> sometimes need to be able to see all the reasons "causali" between
specific
> dates. I would like to know if and how that is possible by just leaving
the
> "causali" combobox empty. Of course any other suggestion is more than
> welcome
>
> Thanks
>
> -- 
> Lisa
> Save the Dogs Onlus - www.savethedogs.eu
>
> Aiutaci a costruire il nuovo rifugio, dona il 5 per mille a Save The Dogs
:
> 97394230151
>
>

0
Jeff
3/2/2008 1:55:14 PM
Hi Jeff, the query works fine.. I only need to have a way to show all the 
"causali" if I don't select anything in the combobox. Here you have my query 
sql...

PARAMETERS [Forms]![Reference]![DataDa] DateTime, 
[Forms]![Reference]![DataA] DateTime;
SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome, 
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas, 
Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia, 
Anagrafica.SysDate, Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON 
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID = 
Transazioni.CausaleID
WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And 
(Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND 
((Causali.CausaleID)=[Forms]![Reference]![Causals]))
ORDER BY Transazioni.Datas;

Thanks

Lisa
"Jeff Boyce" <JeffBoyce_IF@msn.com-DISCARD_HYPHEN_TO_END> wrote in message 
news:%23Q9Nk0GfIHA.4476@TK2MSFTNGP06.phx.gbl...
> Lisa
>
> If your query needs to display the "causali", you'll first need to make 
> sure
> it is set to do that, not just use it as a selection criteria/parameter.
>
> Or are  you trying to do two separate queries?
>
> -- 
> Regards
>
> Jeff Boyce
> www.InformationFutures.net
>
> Microsoft Office/Access MVP
> http://mvp.support.microsoft.com/
>
> Microsoft IT Academy Program Mentor
> http://microsoftitacademy.com/
>
> "Lisa" <Lisa@savethedogs.it> wrote in message
> news:mBvyj.1913$q53.828@tornado.fastwebnet.it...
>> Hello everybody. I have this query which works fine. It takes its
> parameters
>> (date from - date to - reasons) from a form. This works also fine. I
>> sometimes need to be able to see all the reasons "causali" between
> specific
>> dates. I would like to know if and how that is possible by just leaving
> the
>> "causali" combobox empty. Of course any other suggestion is more than
>> welcome
>>
>> Thanks
>>
>> -- 
>> Lisa
>> Save the Dogs Onlus - www.savethedogs.eu
>>
>> Aiutaci a costruire il nuovo rifugio, dona il 5 per mille a Save The Dogs
> :
>> 97394230151
>>
>>
> 


0
Lisa
3/2/2008 3:00:46 PM
WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And
(Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND
(((Causali.CausaleID)=[Forms]![Reference]![Causals])) OR
([Forms]![Reference]![Causals] IS NULL))


-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Lisa" <Lisa@savethedogs.it> wrote in message 
news:pkzyj.2148$q53.299@tornado.fastwebnet.it...
> Hi Jeff, the query works fine.. I only need to have a way to show all the 
> "causali" if I don't select anything in the combobox. Here you have my 
> query sql...
>
> PARAMETERS [Forms]![Reference]![DataDa] DateTime, 
> [Forms]![Reference]![DataA] DateTime;
> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome, 
> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas, 
> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia, 
> Anagrafica.SysDate, Anagrafica.Email
> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON 
> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID = 
> Transazioni.CausaleID
> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And 
> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND 
> ((Causali.CausaleID)=[Forms]![Reference]![Causals]))
> ORDER BY Transazioni.Datas;
>
> Thanks
>
> Lisa
> "Jeff Boyce" <JeffBoyce_IF@msn.com-DISCARD_HYPHEN_TO_END> wrote in message 
> news:%23Q9Nk0GfIHA.4476@TK2MSFTNGP06.phx.gbl...
>> Lisa
>>
>> If your query needs to display the "causali", you'll first need to make 
>> sure
>> it is set to do that, not just use it as a selection criteria/parameter.
>>
>> Or are  you trying to do two separate queries?
>>
>> -- 
>> Regards
>>
>> Jeff Boyce
>> www.InformationFutures.net
>>
>> Microsoft Office/Access MVP
>> http://mvp.support.microsoft.com/
>>
>> Microsoft IT Academy Program Mentor
>> http://microsoftitacademy.com/
>>
>> "Lisa" <Lisa@savethedogs.it> wrote in message
>> news:mBvyj.1913$q53.828@tornado.fastwebnet.it...
>>> Hello everybody. I have this query which works fine. It takes its
>> parameters
>>> (date from - date to - reasons) from a form. This works also fine. I
>>> sometimes need to be able to see all the reasons "causali" between
>> specific
>>> dates. I would like to know if and how that is possible by just leaving
>> the
>>> "causali" combobox empty. Of course any other suggestion is more than
>>> welcome
>>>
>>> Thanks
>>>
>>> -- 
>>> Lisa
>>> Save the Dogs Onlus - www.savethedogs.eu
>>>
>>> Aiutaci a costruire il nuovo rifugio, dona il 5 per mille a Save The 
>>> Dogs
>> :
>>> 97394230151
>>>
>>>
>>
>
> 


0
Douglas
3/2/2008 3:52:35 PM
If Causali.CausaleID is a text field then you can use

PARAMETERS [Forms]![Reference]![DataDa] DateTime,
[Forms]![Reference]![DataA] DateTime;
SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia,
Anagrafica.SysDate, Anagrafica.Email
FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID =
Transazioni.CausaleID
WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And
(Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND
((Causali.CausaleID) LIKE Nz([Forms]![Reference]![Causals],"*"))
ORDER BY Transazioni.Datas;

If the field is numeric, then you can try the following

WHERE

(Transazioni.Datas >=[Forms]![Reference]![DataDa] And
  Transazioni.Datas<=[Forms]![Reference]![DataA])
AND
(Causali.CausaleID=[Forms]![Reference]![Causals] OR
  [Forms]![Reference]![Causals]Is Null)

WARNING: Access will rearrange this query criteria into a more complex 
format when you save the query and reopen it.  It will add a calculated 
column with [Forms]![Reference]![Causals] as the value and then will 
create two lines of criteria.  One where it checks the value of 
[Forms]![Reference]![Causals] is null along with the dates and a second 
where it check all three fields, but ignores the new column.


'====================================================
  John Spencer
  Access MVP 2002-2005, 2007-2008
  Center for Health Program Development and Management
  University of Maryland Baltimore County
'====================================================


Lisa wrote:
> Hi Jeff, the query works fine.. I only need to have a way to show all the 
> "causali" if I don't select anything in the combobox. Here you have my query 
> sql...
> 
> PARAMETERS [Forms]![Reference]![DataDa] DateTime, 
> [Forms]![Reference]![DataA] DateTime;
> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome, 
> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas, 
> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia, 
> Anagrafica.SysDate, Anagrafica.Email
> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON 
> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID = 
> Transazioni.CausaleID
> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And 
> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND 
> ((Causali.CausaleID)=[Forms]![Reference]![Causals]))
> ORDER BY Transazioni.Datas;
> 
> Thanks
> 
> Lisa
> "Jeff Boyce" <JeffBoyce_IF@msn.com-DISCARD_HYPHEN_TO_END> wrote in message 
> news:%23Q9Nk0GfIHA.4476@TK2MSFTNGP06.phx.gbl...
>> Lisa
>>
>> If your query needs to display the "causali", you'll first need to make 
>> sure
>> it is set to do that, not just use it as a selection criteria/parameter.
>>
>> Or are  you trying to do two separate queries?
>>
>> -- 
>> Regards
>>
>> Jeff Boyce
>> www.InformationFutures.net
>>
>> Microsoft Office/Access MVP
>> http://mvp.support.microsoft.com/
>>
>> Microsoft IT Academy Program Mentor
>> http://microsoftitacademy.com/
>>
>> "Lisa" <Lisa@savethedogs.it> wrote in message
>> news:mBvyj.1913$q53.828@tornado.fastwebnet.it...
>>> Hello everybody. I have this query which works fine. It takes its
>> parameters
>>> (date from - date to - reasons) from a form. This works also fine. I
>>> sometimes need to be able to see all the reasons "causali" between
>> specific
>>> dates. I would like to know if and how that is possible by just leaving
>> the
>>> "causali" combobox empty. Of course any other suggestion is more than
>>> welcome
>>>
>>> Thanks
>>>
>>> -- 
>>> Lisa
>>> Save the Dogs Onlus - www.savethedogs.eu
>>>
>>> Aiutaci a costruire il nuovo rifugio, dona il 5 per mille a Save The Dogs
>> :
>>> 97394230151
>>>
>>>
> 
> 
0
John
3/2/2008 4:00:37 PM
John I am trying to use the changes you gave me but I get a syntax error 
(missing operator) in query expression


"John Spencer" <spencer@chpdm.umbc> wrote in message 
news:OuG3Q6HfIHA.5620@TK2MSFTNGP04.phx.gbl...
> If Causali.CausaleID is a text field then you can use
>
> PARAMETERS [Forms]![Reference]![DataDa] DateTime,
> [Forms]![Reference]![DataA] DateTime;
> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia,
> Anagrafica.SysDate, Anagrafica.Email
> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID =
> Transazioni.CausaleID
> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And
> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND
> ((Causali.CausaleID) LIKE Nz([Forms]![Reference]![Causals],"*"))
> ORDER BY Transazioni.Datas;
>
> If the field is numeric, then you can try the following
>
> WHERE
>
> (Transazioni.Datas >=[Forms]![Reference]![DataDa] And
>  Transazioni.Datas<=[Forms]![Reference]![DataA])
> AND
> (Causali.CausaleID=[Forms]![Reference]![Causals] OR
>  [Forms]![Reference]![Causals]Is Null)
>
> WARNING: Access will rearrange this query criteria into a more complex 
> format when you save the query and reopen it.  It will add a calculated 
> column with [Forms]![Reference]![Causals] as the value and then will 
> create two lines of criteria.  One where it checks the value of 
> [Forms]![Reference]![Causals] is null along with the dates and a second 
> where it check all three fields, but ignores the new column.
>
>
> '====================================================
>  John Spencer
>  Access MVP 2002-2005, 2007-2008
>  Center for Health Program Development and Management
>  University of Maryland Baltimore County
> '====================================================
>
>
> Lisa wrote:
>> Hi Jeff, the query works fine.. I only need to have a way to show all the 
>> "causali" if I don't select anything in the combobox. Here you have my 
>> query sql...
>>
>> PARAMETERS [Forms]![Reference]![DataDa] DateTime, 
>> [Forms]![Reference]![DataA] DateTime;
>> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome, 
>> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas, 
>> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia, 
>> Anagrafica.SysDate, Anagrafica.Email
>> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON 
>> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID 
>> = Transazioni.CausaleID
>> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And 
>> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND 
>> ((Causali.CausaleID)=[Forms]![Reference]![Causals]))
>> ORDER BY Transazioni.Datas;
>>
>> Thanks
>>
>> Lisa
>> "Jeff Boyce" <JeffBoyce_IF@msn.com-DISCARD_HYPHEN_TO_END> wrote in 
>> message news:%23Q9Nk0GfIHA.4476@TK2MSFTNGP06.phx.gbl...
>>> Lisa
>>>
>>> If your query needs to display the "causali", you'll first need to make 
>>> sure
>>> it is set to do that, not just use it as a selection criteria/parameter.
>>>
>>> Or are  you trying to do two separate queries?
>>>
>>> -- 
>>> Regards
>>>
>>> Jeff Boyce
>>> www.InformationFutures.net
>>>
>>> Microsoft Office/Access MVP
>>> http://mvp.support.microsoft.com/
>>>
>>> Microsoft IT Academy Program Mentor
>>> http://microsoftitacademy.com/
>>>
>>> "Lisa" <Lisa@savethedogs.it> wrote in message
>>> news:mBvyj.1913$q53.828@tornado.fastwebnet.it...
>>>> Hello everybody. I have this query which works fine. It takes its
>>> parameters
>>>> (date from - date to - reasons) from a form. This works also fine. I
>>>> sometimes need to be able to see all the reasons "causali" between
>>> specific
>>>> dates. I would like to know if and how that is possible by just leaving
>>> the
>>>> "causali" combobox empty. Of course any other suggestion is more than
>>>> welcome
>>>>
>>>> Thanks
>>>>
>>>> -- 
>>>> Lisa
>>>> Save the Dogs Onlus - www.savethedogs.eu
>>>>
>>>> Aiutaci a costruire il nuovo rifugio, dona il 5 per mille a Save The 
>>>> Dogs
>>> :
>>>> 97394230151
>>>>
>>>>
>> 

0
Lisa
3/2/2008 6:20:01 PM
I have also tried Douglas solution but that gives me all the transactions in 
my database and not only the ones between the chosen dates...
"John Spencer" <spencer@chpdm.umbc> wrote in message 
news:OuG3Q6HfIHA.5620@TK2MSFTNGP04.phx.gbl...
> If Causali.CausaleID is a text field then you can use
>
> PARAMETERS [Forms]![Reference]![DataDa] DateTime,
> [Forms]![Reference]![DataA] DateTime;
> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia,
> Anagrafica.SysDate, Anagrafica.Email
> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID =
> Transazioni.CausaleID
> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And
> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND
> ((Causali.CausaleID) LIKE Nz([Forms]![Reference]![Causals],"*"))
> ORDER BY Transazioni.Datas;
>
> If the field is numeric, then you can try the following
>
> WHERE
>
> (Transazioni.Datas >=[Forms]![Reference]![DataDa] And
>  Transazioni.Datas<=[Forms]![Reference]![DataA])
> AND
> (Causali.CausaleID=[Forms]![Reference]![Causals] OR
>  [Forms]![Reference]![Causals]Is Null)
>
> WARNING: Access will rearrange this query criteria into a more complex 
> format when you save the query and reopen it.  It will add a calculated 
> column with [Forms]![Reference]![Causals] as the value and then will 
> create two lines of criteria.  One where it checks the value of 
> [Forms]![Reference]![Causals] is null along with the dates and a second 
> where it check all three fields, but ignores the new column.
>
>
> '====================================================
>  John Spencer
>  Access MVP 2002-2005, 2007-2008
>  Center for Health Program Development and Management
>  University of Maryland Baltimore County
> '====================================================
>
>
> Lisa wrote:
>> Hi Jeff, the query works fine.. I only need to have a way to show all the 
>> "causali" if I don't select anything in the combobox. Here you have my 
>> query sql...
>>
>> PARAMETERS [Forms]![Reference]![DataDa] DateTime, 
>> [Forms]![Reference]![DataA] DateTime;
>> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome, 
>> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas, 
>> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia, 
>> Anagrafica.SysDate, Anagrafica.Email
>> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON 
>> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID 
>> = Transazioni.CausaleID
>> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And 
>> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND 
>> ((Causali.CausaleID)=[Forms]![Reference]![Causals]))
>> ORDER BY Transazioni.Datas;
>>
>> Thanks
>>
>> Lisa
>> "Jeff Boyce" <JeffBoyce_IF@msn.com-DISCARD_HYPHEN_TO_END> wrote in 
>> message news:%23Q9Nk0GfIHA.4476@TK2MSFTNGP06.phx.gbl...
>>> Lisa
>>>
>>> If your query needs to display the "causali", you'll first need to make 
>>> sure
>>> it is set to do that, not just use it as a selection criteria/parameter.
>>>
>>> Or are  you trying to do two separate queries?
>>>
>>> -- 
>>> Regards
>>>
>>> Jeff Boyce
>>> www.InformationFutures.net
>>>
>>> Microsoft Office/Access MVP
>>> http://mvp.support.microsoft.com/
>>>
>>> Microsoft IT Academy Program Mentor
>>> http://microsoftitacademy.com/
>>>
>>> "Lisa" <Lisa@savethedogs.it> wrote in message
>>> news:mBvyj.1913$q53.828@tornado.fastwebnet.it...
>>>> Hello everybody. I have this query which works fine. It takes its
>>> parameters
>>>> (date from - date to - reasons) from a form. This works also fine. I
>>>> sometimes need to be able to see all the reasons "causali" between
>>> specific
>>>> dates. I would like to know if and how that is possible by just leaving
>>> the
>>>> "causali" combobox empty. Of course any other suggestion is more than
>>>> welcome
>>>>
>>>> Thanks
>>>>
>>>> -- 
>>>> Lisa
>>>> Save the Dogs Onlus - www.savethedogs.eu
>>>>
>>>> Aiutaci a costruire il nuovo rifugio, dona il 5 per mille a Save The 
>>>> Dogs
>>> :
>>>> 97394230151
>>>>
>>>>
>> 

0
Lisa
3/2/2008 6:29:03 PM
You sure you got the parentheses the same as I had them?

Here's a slightly simplified form, removing some of the unnecessary 
parentheses Access inserted:

WHERE (Transazioni.Datas>=[Forms]![Reference]![DataDa] And
Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND
(Causali.CausaleID=[Forms]![Reference]![Causals] OR
[Forms]![Reference]![Causals] IS NULL)



-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Lisa" <Lisa@savethedogs.it> wrote in message 
news:GnCyj.2446$q53.2443@tornado.fastwebnet.it...
>I have also tried Douglas solution but that gives me all the transactions 
>in my database and not only the ones between the chosen dates...
> "John Spencer" <spencer@chpdm.umbc> wrote in message 
> news:OuG3Q6HfIHA.5620@TK2MSFTNGP04.phx.gbl...
>> If Causali.CausaleID is a text field then you can use
>>
>> PARAMETERS [Forms]![Reference]![DataDa] DateTime,
>> [Forms]![Reference]![DataA] DateTime;
>> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
>> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
>> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia,
>> Anagrafica.SysDate, Anagrafica.Email
>> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
>> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID 
>> =
>> Transazioni.CausaleID
>> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And
>> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND
>> ((Causali.CausaleID) LIKE Nz([Forms]![Reference]![Causals],"*"))
>> ORDER BY Transazioni.Datas;
>>
>> If the field is numeric, then you can try the following
>>
>> WHERE
>>
>> (Transazioni.Datas >=[Forms]![Reference]![DataDa] And
>>  Transazioni.Datas<=[Forms]![Reference]![DataA])
>> AND
>> (Causali.CausaleID=[Forms]![Reference]![Causals] OR
>>  [Forms]![Reference]![Causals]Is Null)
>>
>> WARNING: Access will rearrange this query criteria into a more complex 
>> format when you save the query and reopen it.  It will add a calculated 
>> column with [Forms]![Reference]![Causals] as the value and then will 
>> create two lines of criteria.  One where it checks the value of 
>> [Forms]![Reference]![Causals] is null along with the dates and a second 
>> where it check all three fields, but ignores the new column.
>>
>>
>> '====================================================
>>  John Spencer
>>  Access MVP 2002-2005, 2007-2008
>>  Center for Health Program Development and Management
>>  University of Maryland Baltimore County
>> '====================================================
>>
>>
>> Lisa wrote:
>>> Hi Jeff, the query works fine.. I only need to have a way to show all 
>>> the "causali" if I don't select anything in the combobox. Here you have 
>>> my query sql...
>>>
>>> PARAMETERS [Forms]![Reference]![DataDa] DateTime, 
>>> [Forms]![Reference]![DataA] DateTime;
>>> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome, 
>>> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas, 
>>> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia, 
>>> Anagrafica.SysDate, Anagrafica.Email
>>> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON 
>>> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID 
>>> = Transazioni.CausaleID
>>> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And 
>>> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND 
>>> ((Causali.CausaleID)=[Forms]![Reference]![Causals]))
>>> ORDER BY Transazioni.Datas;
>>>
>>> Thanks
>>>
>>> Lisa
>>> "Jeff Boyce" <JeffBoyce_IF@msn.com-DISCARD_HYPHEN_TO_END> wrote in 
>>> message news:%23Q9Nk0GfIHA.4476@TK2MSFTNGP06.phx.gbl...
>>>> Lisa
>>>>
>>>> If your query needs to display the "causali", you'll first need to make 
>>>> sure
>>>> it is set to do that, not just use it as a selection 
>>>> criteria/parameter.
>>>>
>>>> Or are  you trying to do two separate queries?
>>>>
>>>> -- 
>>>> Regards
>>>>
>>>> Jeff Boyce
>>>> www.InformationFutures.net
>>>>
>>>> Microsoft Office/Access MVP
>>>> http://mvp.support.microsoft.com/
>>>>
>>>> Microsoft IT Academy Program Mentor
>>>> http://microsoftitacademy.com/
>>>>
>>>> "Lisa" <Lisa@savethedogs.it> wrote in message
>>>> news:mBvyj.1913$q53.828@tornado.fastwebnet.it...
>>>>> Hello everybody. I have this query which works fine. It takes its
>>>> parameters
>>>>> (date from - date to - reasons) from a form. This works also fine. I
>>>>> sometimes need to be able to see all the reasons "causali" between
>>>> specific
>>>>> dates. I would like to know if and how that is possible by just 
>>>>> leaving
>>>> the
>>>>> "causali" combobox empty. Of course any other suggestion is more than
>>>>> welcome
>>>>>
>>>>> Thanks
>>>>>
>>>>> -- 
>>>>> Lisa
>>>>> Save the Dogs Onlus - www.savethedogs.eu
>>>>>
>>>>> Aiutaci a costruire il nuovo rifugio, dona il 5 per mille a Save The 
>>>>> Dogs
>>>> :
>>>>> 97394230151
>>>>>
>>>>>
>>>
> 


0
Douglas
3/2/2008 8:52:04 PM
Hello Douglas, I think it works (I had to delete 1 parentheses). Thank you 
very very much for you help. And John and Jeff too.. thank you all.

Lisa
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
news:Ox3TCdKfIHA.5984@TK2MSFTNGP06.phx.gbl...
> You sure you got the parentheses the same as I had them?
>
> Here's a slightly simplified form, removing some of the unnecessary 
> parentheses Access inserted:
>
> WHERE (Transazioni.Datas>=[Forms]![Reference]![DataDa] And
> Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND
> (Causali.CausaleID=[Forms]![Reference]![Causals] OR
> [Forms]![Reference]![Causals] IS NULL)
>
>
>
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Lisa" <Lisa@savethedogs.it> wrote in message 
> news:GnCyj.2446$q53.2443@tornado.fastwebnet.it...
>>I have also tried Douglas solution but that gives me all the transactions 
>>in my database and not only the ones between the chosen dates...
>> "John Spencer" <spencer@chpdm.umbc> wrote in message 
>> news:OuG3Q6HfIHA.5620@TK2MSFTNGP04.phx.gbl...
>>> If Causali.CausaleID is a text field then you can use
>>>
>>> PARAMETERS [Forms]![Reference]![DataDa] DateTime,
>>> [Forms]![Reference]![DataA] DateTime;
>>> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
>>> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
>>> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia,
>>> Anagrafica.SysDate, Anagrafica.Email
>>> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
>>> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON Causali.CausaleID 
>>> =
>>> Transazioni.CausaleID
>>> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And
>>> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND
>>> ((Causali.CausaleID) LIKE Nz([Forms]![Reference]![Causals],"*"))
>>> ORDER BY Transazioni.Datas;
>>>
>>> If the field is numeric, then you can try the following
>>>
>>> WHERE
>>>
>>> (Transazioni.Datas >=[Forms]![Reference]![DataDa] And
>>>  Transazioni.Datas<=[Forms]![Reference]![DataA])
>>> AND
>>> (Causali.CausaleID=[Forms]![Reference]![Causals] OR
>>>  [Forms]![Reference]![Causals]Is Null)
>>>
>>> WARNING: Access will rearrange this query criteria into a more complex 
>>> format when you save the query and reopen it.  It will add a calculated 
>>> column with [Forms]![Reference]![Causals] as the value and then will 
>>> create two lines of criteria.  One where it checks the value of 
>>> [Forms]![Reference]![Causals] is null along with the dates and a second 
>>> where it check all three fields, but ignores the new column.
>>>
>>>
>>> '====================================================
>>>  John Spencer
>>>  Access MVP 2002-2005, 2007-2008
>>>  Center for Health Program Development and Management
>>>  University of Maryland Baltimore County
>>> '====================================================
>>>
>>>
>>> Lisa wrote:
>>>> Hi Jeff, the query works fine.. I only need to have a way to show all 
>>>> the "causali" if I don't select anything in the combobox. Here you have 
>>>> my query sql...
>>>>
>>>> PARAMETERS [Forms]![Reference]![DataDa] DateTime, 
>>>> [Forms]![Reference]![DataA] DateTime;
>>>> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome, 
>>>> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas, 
>>>> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia, 
>>>> Anagrafica.SysDate, Anagrafica.Email
>>>> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON 
>>>> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON 
>>>> Causali.CausaleID = Transazioni.CausaleID
>>>> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And 
>>>> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND 
>>>> ((Causali.CausaleID)=[Forms]![Reference]![Causals]))
>>>> ORDER BY Transazioni.Datas;
>>>>
>>>> Thanks
>>>>
>>>> Lisa
>>>> "Jeff Boyce" <JeffBoyce_IF@msn.com-DISCARD_HYPHEN_TO_END> wrote in 
>>>> message news:%23Q9Nk0GfIHA.4476@TK2MSFTNGP06.phx.gbl...
>>>>> Lisa
>>>>>
>>>>> If your query needs to display the "causali", you'll first need to 
>>>>> make sure
>>>>> it is set to do that, not just use it as a selection 
>>>>> criteria/parameter.
>>>>>
>>>>> Or are  you trying to do two separate queries?
>>>>>
>>>>> -- 
>>>>> Regards
>>>>>
>>>>> Jeff Boyce
>>>>> www.InformationFutures.net
>>>>>
>>>>> Microsoft Office/Access MVP
>>>>> http://mvp.support.microsoft.com/
>>>>>
>>>>> Microsoft IT Academy Program Mentor
>>>>> http://microsoftitacademy.com/
>>>>>
>>>>> "Lisa" <Lisa@savethedogs.it> wrote in message
>>>>> news:mBvyj.1913$q53.828@tornado.fastwebnet.it...
>>>>>> Hello everybody. I have this query which works fine. It takes its
>>>>> parameters
>>>>>> (date from - date to - reasons) from a form. This works also fine. I
>>>>>> sometimes need to be able to see all the reasons "causali" between
>>>>> specific
>>>>>> dates. I would like to know if and how that is possible by just 
>>>>>> leaving
>>>>> the
>>>>>> "causali" combobox empty. Of course any other suggestion is more than
>>>>>> welcome
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> -- 
>>>>>> Lisa
>>>>>> Save the Dogs Onlus - www.savethedogs.eu
>>>>>>
>>>>>> Aiutaci a costruire il nuovo rifugio, dona il 5 per mille a Save The 
>>>>>> Dogs
>>>>> :
>>>>>> 97394230151
>>>>>>
>>>>>>
>>>>
>>
>
> 


0
Lisa
3/2/2008 11:11:56 PM
Oops, you're correct. I did forget to remove a closing parenthesis. It 
should have been

 WHERE (Transazioni.Datas>=[Forms]![Reference]![DataDa] And
 Transazioni.Datas<=[Forms]![Reference]![DataA]) AND
 (Causali.CausaleID=[Forms]![Reference]![Causals] OR
 [Forms]![Reference]![Causals] IS NULL)

Sorry about that.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Lisa" <Lisa@savethedogs.it> wrote in message 
news:TwGyj.3037$q53.1917@tornado.fastwebnet.it...
> Hello Douglas, I think it works (I had to delete 1 parentheses). Thank you 
> very very much for you help. And John and Jeff too.. thank you all.
>
> Lisa
> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
> news:Ox3TCdKfIHA.5984@TK2MSFTNGP06.phx.gbl...
>> You sure you got the parentheses the same as I had them?
>>
>> Here's a slightly simplified form, removing some of the unnecessary 
>> parentheses Access inserted:
>>
>> WHERE (Transazioni.Datas>=[Forms]![Reference]![DataDa] And
>> Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND
>> (Causali.CausaleID=[Forms]![Reference]![Causals] OR
>> [Forms]![Reference]![Causals] IS NULL)
>>
>>
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no private e-mails, please)
>>
>>
>> "Lisa" <Lisa@savethedogs.it> wrote in message 
>> news:GnCyj.2446$q53.2443@tornado.fastwebnet.it...
>>>I have also tried Douglas solution but that gives me all the transactions 
>>>in my database and not only the ones between the chosen dates...
>>> "John Spencer" <spencer@chpdm.umbc> wrote in message 
>>> news:OuG3Q6HfIHA.5620@TK2MSFTNGP04.phx.gbl...
>>>> If Causali.CausaleID is a text field then you can use
>>>>
>>>> PARAMETERS [Forms]![Reference]![DataDa] DateTime,
>>>> [Forms]![Reference]![DataA] DateTime;
>>>> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
>>>> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
>>>> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia,
>>>> Anagrafica.SysDate, Anagrafica.Email
>>>> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
>>>> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON 
>>>> Causali.CausaleID =
>>>> Transazioni.CausaleID
>>>> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And
>>>> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND
>>>> ((Causali.CausaleID) LIKE Nz([Forms]![Reference]![Causals],"*"))
>>>> ORDER BY Transazioni.Datas;
>>>>
>>>> If the field is numeric, then you can try the following
>>>>
>>>> WHERE
>>>>
>>>> (Transazioni.Datas >=[Forms]![Reference]![DataDa] And
>>>>  Transazioni.Datas<=[Forms]![Reference]![DataA])
>>>> AND
>>>> (Causali.CausaleID=[Forms]![Reference]![Causals] OR
>>>>  [Forms]![Reference]![Causals]Is Null)
>>>>
>>>> WARNING: Access will rearrange this query criteria into a more complex 
>>>> format when you save the query and reopen it.  It will add a calculated 
>>>> column with [Forms]![Reference]![Causals] as the value and then will 
>>>> create two lines of criteria.  One where it checks the value of 
>>>> [Forms]![Reference]![Causals] is null along with the dates and a second 
>>>> where it check all three fields, but ignores the new column.
>>>>
>>>>
>>>> '====================================================
>>>>  John Spencer
>>>>  Access MVP 2002-2005, 2007-2008
>>>>  Center for Health Program Development and Management
>>>>  University of Maryland Baltimore County
>>>> '====================================================
>>>>
>>>>
>>>> Lisa wrote:
>>>>> Hi Jeff, the query works fine.. I only need to have a way to show all 
>>>>> the "causali" if I don't select anything in the combobox. Here you 
>>>>> have my query sql...
>>>>>
>>>>> PARAMETERS [Forms]![Reference]![DataDa] DateTime, 
>>>>> [Forms]![Reference]![DataA] DateTime;
>>>>> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome, 
>>>>> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas, 
>>>>> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia, 
>>>>> Anagrafica.SysDate, Anagrafica.Email
>>>>> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON 
>>>>> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON 
>>>>> Causali.CausaleID = Transazioni.CausaleID
>>>>> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And 
>>>>> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND 
>>>>> ((Causali.CausaleID)=[Forms]![Reference]![Causals]))
>>>>> ORDER BY Transazioni.Datas;
>>>>>
>>>>> Thanks
>>>>>
>>>>> Lisa
>>>>> "Jeff Boyce" <JeffBoyce_IF@msn.com-DISCARD_HYPHEN_TO_END> wrote in 
>>>>> message news:%23Q9Nk0GfIHA.4476@TK2MSFTNGP06.phx.gbl...
>>>>>> Lisa
>>>>>>
>>>>>> If your query needs to display the "causali", you'll first need to 
>>>>>> make sure
>>>>>> it is set to do that, not just use it as a selection 
>>>>>> criteria/parameter.
>>>>>>
>>>>>> Or are  you trying to do two separate queries?
>>>>>>
>>>>>> -- 
>>>>>> Regards
>>>>>>
>>>>>> Jeff Boyce
>>>>>> www.InformationFutures.net
>>>>>>
>>>>>> Microsoft Office/Access MVP
>>>>>> http://mvp.support.microsoft.com/
>>>>>>
>>>>>> Microsoft IT Academy Program Mentor
>>>>>> http://microsoftitacademy.com/
>>>>>>
>>>>>> "Lisa" <Lisa@savethedogs.it> wrote in message
>>>>>> news:mBvyj.1913$q53.828@tornado.fastwebnet.it...
>>>>>>> Hello everybody. I have this query which works fine. It takes its
>>>>>> parameters
>>>>>>> (date from - date to - reasons) from a form. This works also fine. I
>>>>>>> sometimes need to be able to see all the reasons "causali" between
>>>>>> specific
>>>>>>> dates. I would like to know if and how that is possible by just 
>>>>>>> leaving
>>>>>> the
>>>>>>> "causali" combobox empty. Of course any other suggestion is more 
>>>>>>> than
>>>>>>> welcome
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> -- 
>>>>>>> Lisa
>>>>>>> Save the Dogs Onlus - www.savethedogs.eu
>>>>>>>
>>>>>>> Aiutaci a costruire il nuovo rifugio, dona il 5 per mille a Save The 
>>>>>>> Dogs
>>>>>> :
>>>>>>> 97394230151
>>>>>>>
>>>>>>>
>>>>>
>>>
>>
>>
>
> 


0
Douglas
3/3/2008 1:12:51 AM
No problem really, I am very glad it works...  thank you again

Lisa
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
news:uWLbtuMfIHA.484@TK2MSFTNGP06.phx.gbl...
> Oops, you're correct. I did forget to remove a closing parenthesis. It 
> should have been
>
> WHERE (Transazioni.Datas>=[Forms]![Reference]![DataDa] And
> Transazioni.Datas<=[Forms]![Reference]![DataA]) AND
> (Causali.CausaleID=[Forms]![Reference]![Causals] OR
> [Forms]![Reference]![Causals] IS NULL)
>
> Sorry about that.
>
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Lisa" <Lisa@savethedogs.it> wrote in message 
> news:TwGyj.3037$q53.1917@tornado.fastwebnet.it...
>> Hello Douglas, I think it works (I had to delete 1 parentheses). Thank 
>> you very very much for you help. And John and Jeff too.. thank you all.
>>
>> Lisa
>> "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message 
>> news:Ox3TCdKfIHA.5984@TK2MSFTNGP06.phx.gbl...
>>> You sure you got the parentheses the same as I had them?
>>>
>>> Here's a slightly simplified form, removing some of the unnecessary 
>>> parentheses Access inserted:
>>>
>>> WHERE (Transazioni.Datas>=[Forms]![Reference]![DataDa] And
>>> Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND
>>> (Causali.CausaleID=[Forms]![Reference]![Causals] OR
>>> [Forms]![Reference]![Causals] IS NULL)
>>>
>>>
>>>
>>> -- 
>>> Doug Steele, Microsoft Access MVP
>>> http://I.Am/DougSteele
>>> (no private e-mails, please)
>>>
>>>
>>> "Lisa" <Lisa@savethedogs.it> wrote in message 
>>> news:GnCyj.2446$q53.2443@tornado.fastwebnet.it...
>>>>I have also tried Douglas solution but that gives me all the 
>>>>transactions in my database and not only the ones between the chosen 
>>>>dates...
>>>> "John Spencer" <spencer@chpdm.umbc> wrote in message 
>>>> news:OuG3Q6HfIHA.5620@TK2MSFTNGP04.phx.gbl...
>>>>> If Causali.CausaleID is a text field then you can use
>>>>>
>>>>> PARAMETERS [Forms]![Reference]![DataDa] DateTime,
>>>>> [Forms]![Reference]![DataA] DateTime;
>>>>> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome,
>>>>> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas,
>>>>> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia,
>>>>> Anagrafica.SysDate, Anagrafica.Email
>>>>> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON
>>>>> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON 
>>>>> Causali.CausaleID =
>>>>> Transazioni.CausaleID
>>>>> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And
>>>>> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND
>>>>> ((Causali.CausaleID) LIKE Nz([Forms]![Reference]![Causals],"*"))
>>>>> ORDER BY Transazioni.Datas;
>>>>>
>>>>> If the field is numeric, then you can try the following
>>>>>
>>>>> WHERE
>>>>>
>>>>> (Transazioni.Datas >=[Forms]![Reference]![DataDa] And
>>>>>  Transazioni.Datas<=[Forms]![Reference]![DataA])
>>>>> AND
>>>>> (Causali.CausaleID=[Forms]![Reference]![Causals] OR
>>>>>  [Forms]![Reference]![Causals]Is Null)
>>>>>
>>>>> WARNING: Access will rearrange this query criteria into a more complex 
>>>>> format when you save the query and reopen it.  It will add a 
>>>>> calculated column with [Forms]![Reference]![Causals] as the value and 
>>>>> then will create two lines of criteria.  One where it checks the value 
>>>>> of [Forms]![Reference]![Causals] is null along with the dates and a 
>>>>> second where it check all three fields, but ignores the new column.
>>>>>
>>>>>
>>>>> '====================================================
>>>>>  John Spencer
>>>>>  Access MVP 2002-2005, 2007-2008
>>>>>  Center for Health Program Development and Management
>>>>>  University of Maryland Baltimore County
>>>>> '====================================================
>>>>>
>>>>>
>>>>> Lisa wrote:
>>>>>> Hi Jeff, the query works fine.. I only need to have a way to show all 
>>>>>> the "causali" if I don't select anything in the combobox. Here you 
>>>>>> have my query sql...
>>>>>>
>>>>>> PARAMETERS [Forms]![Reference]![DataDa] DateTime, 
>>>>>> [Forms]![Reference]![DataA] DateTime;
>>>>>> SELECT Transazioni.Importo, Transazioni.Note, Anagrafica.Nome, 
>>>>>> Anagrafica.Cognome, Causali.Causale, Transazioni.Datas, 
>>>>>> Anagrafica.Indirizzo, Anagrafica.[Cap&Citta], Anagrafica.Provincia, 
>>>>>> Anagrafica.SysDate, Anagrafica.Email
>>>>>> FROM Causali RIGHT JOIN (Anagrafica RIGHT JOIN Transazioni ON 
>>>>>> Anagrafica.AnagraficaID = Transazioni.AnagraficaID) ON 
>>>>>> Causali.CausaleID = Transazioni.CausaleID
>>>>>> WHERE (((Transazioni.Datas)>=[Forms]![Reference]![DataDa] And 
>>>>>> (Transazioni.Datas)<=[Forms]![Reference]![DataA]) AND 
>>>>>> ((Causali.CausaleID)=[Forms]![Reference]![Causals]))
>>>>>> ORDER BY Transazioni.Datas;
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Lisa
>>>>>> "Jeff Boyce" <JeffBoyce_IF@msn.com-DISCARD_HYPHEN_TO_END> wrote in 
>>>>>> message news:%23Q9Nk0GfIHA.4476@TK2MSFTNGP06.phx.gbl...
>>>>>>> Lisa
>>>>>>>
>>>>>>> If your query needs to display the "causali", you'll first need to 
>>>>>>> make sure
>>>>>>> it is set to do that, not just use it as a selection 
>>>>>>> criteria/parameter.
>>>>>>>
>>>>>>> Or are  you trying to do two separate queries?
>>>>>>>
>>>>>>> -- 
>>>>>>> Regards
>>>>>>>
>>>>>>> Jeff Boyce
>>>>>>> www.InformationFutures.net
>>>>>>>
>>>>>>> Microsoft Office/Access MVP
>>>>>>> http://mvp.support.microsoft.com/
>>>>>>>
>>>>>>> Microsoft IT Academy Program Mentor
>>>>>>> http://microsoftitacademy.com/
>>>>>>>
>>>>>>> "Lisa" <Lisa@savethedogs.it> wrote in message
>>>>>>> news:mBvyj.1913$q53.828@tornado.fastwebnet.it...
>>>>>>>> Hello everybody. I have this query which works fine. It takes its
>>>>>>> parameters
>>>>>>>> (date from - date to - reasons) from a form. This works also fine. 
>>>>>>>> I
>>>>>>>> sometimes need to be able to see all the reasons "causali" between
>>>>>>> specific
>>>>>>>> dates. I would like to know if and how that is possible by just 
>>>>>>>> leaving
>>>>>>> the
>>>>>>>> "causali" combobox empty. Of course any other suggestion is more 
>>>>>>>> than
>>>>>>>> welcome
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> Lisa
>>>>>>>> Save the Dogs Onlus - www.savethedogs.eu
>>>>>>>>
>>>>>>>> Aiutaci a costruire il nuovo rifugio, dona il 5 per mille a Save 
>>>>>>>> The Dogs
>>>>>>> :
>>>>>>>> 97394230151
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>
>>>
>>>
>>
>>
>
> 


0
Lisa
3/3/2008 6:12:30 PM
Reply:

Similar Artilces:

a status like "checking" to change to date format when completed
I am creating a DB that is for Tracking engineering drawings. I want to have a status field that has the following 1. not started 2. in process 3. in checking 4 complete / Date completed Is it possible to have the complete status change to a date somehow? I want to avoid having two fields, a status field and a complete field I would suggest that you may want to change that to have four date fields. DateReceived DateStarted DateReviewStarted DateComplete That way you can easily check its status in the process and get a complete timeline. but to answer your speci...

Append Query 02-28-08
I am trying to append data from tblitemline to tblitemlist. I only want to append new records. The unique field is ListID. I want to append 4 fields total. I can't get it to limit it to new records. Any help would be appreciated. Thanks! New on the basis of what criteria.? Whatever that criteria is it should either the primary key (there can be multiples fields involved as the primary key) or Indexed with NO duplicates, (this will work if the criteria is a single field). Once you set the table up that way, the append query will only add "new" records. You can still have a ...

database query/names issue, causing excel to be sluggish
I have an issue with an excel worksheet I've created. WorkbookA has "Names" which are used to define drop-down menus in WorksheetA. These "Names" are defined to reference a WorksheetB (also in WorkbookA) which itself is populated by a database query, pulling from another Excel WorkbookB. The logic is that WorkbookB should not be touched by the User, only an Admin, and Workbook A is used by User. The Names in WorkbookA are to prevent incorrect entries. Now that I've set it up, WorkbookA is moving really sluggish, but if I delete all the Names it speeds up again....

which query is faster, better to use?
There are multiple AdjournmentDates for any given NoticeID in tblNotices_AdjournemntDates. I want the most recent date for each NoticeID. Both of these produce the correct results. Is either one better than the other? SELECT DISTINCT NoticeID, (SELECT TOP 1 AdjournmentDate FROM dbo.tblNotices_AdjournmentDates WHERE NoticeID = A.NoticeID ORDER BY AdjournmentDate DESC) FROM dbo.tblNotices_AdjournmentDates A SELECT NoticeID, AdjournmentDate FROM dbo.tblNotices_AdjournmentDates A WHERE (AdjournmentDate IN (SELECT TOP 1 AdjournmentDate FROM tblNotices_AdjournmentDates WHER...

Load query with outdata until search
I have a form with sub form on it I use this form to search for products we keep in stock with prices, I have a Search text box on the form then i type in the product then hit the search button and it requerys the sub form Only problem i have is when i first load the form it show every product in the subform, so takes a long time to load Is there a way to load the page with out the date then i can type in product i want to search for then it displays the products Simon What about setting the .RecordSource property of that form (?subform) to "" in the OnLoad event,...

query problem 02-11-08
Hi to Everyone I have a table (tblMunka) with the following columns: JobId; PersonalId;AreaId;StartDate;EndDate;ActiveJob I would like to a query which tell me how many personal was in a term in an area. I have a form (frmLetszam) where user can choose start and end dates from a calendar. I've tried with this but the result is not good: HAVING (((tblMunka.StartDate) Between [Forms]![frmLetszam]![cboEndDate] And [Forms]![frmLetszam]![cboEndDate])) OR (((tblMunka.StartDate)<[Forms]! [frmLetszam]![cboStartDate]) AND ((tblMunka.EndDate) Is Not Null)); Please help me! Best regards -- Mes...

Query with Combo Boxes on a Form
I'm using QBF with about six different combo boxes using: [forms]! [formmain]! [combo1] or [forms]![formmain1]![combo1] -like in a VBA book. This is so users can select criteria on a form with the combo boxes, and when they are done, they hit the search button, and it opens up another form based on the query just performed by the combo selection. This worked for about three combo boxes, but when I added another one, it freezes up and opens up a blank page. It's supposed to open the new form based on the query. Is there a better way to do this? Any help would...

LDAP Query #4
im sorry if this post is in the wrong group how can i create an ldap query to get all the users with exchange boxes inside a specific OU this OU might also have OUs indise it with users that hafve mailboxes i want this to be able to create customized address lists Thank you Address Lists cannot be targeted at particular OUs. You need to use some user attribute that's common for users in that OU - like department, location, company name, etc. -- Bharat Suneja MCSE, MCT www.zenprise.com blog: www.suneja.com/blog ----------------------------------------- "Nazgyl" <naz...

2008 money invoice designer completely broken for me
Specs: Vista Ultimate Money 2k8 Home and Biz Trial Both updated I just downloaded the trial version of Money. I plan(ned?) on buying it and using it for my business. The first thing I did after installing, was open the Invoice Designer and try to create an invoice... I say try because it doesn't work -- at all. First, I tried to add my company logo but the logo box becomes attached to my mouse pointer and I cannot resize the logo. I have to hit ESC for the logo box to detach. No matter what I click on in the designer -- label, textbox, logo -- it becomes attached to my mouse...

Creating a Report using two queries
I have created a chart report (bar chart) using one query. How can I create another single chart showing the results of both queries. One will show the bars of first query data and the other will show bars of the data from second query together in a single chart report. Any suggestions? -- FL This depends on how/if the two queries are related. I would expect the "X" axis values might be related. If so, join the two queries into a single query and graph the new query. -- Duane Hookom Microsoft Access MVP If I have helped you, please help me by donating to UCP http://www...

Complex Update Query in SQl Server 2000
I need to update ACTINDX in UPR40500 for each JOBTITLE in MYTABLE. We have modified the ACTNUMBR in 'MYTABLE' whose segments are contained in GL00100 GL00100 ACTINDX ACTNUMBR_1 ACTNUMBR_2 ACTNUMBR_3 ACTNUMBR_4 ACTNUMBR_5 30562 222 411001 000000 150 350 30563 222 411001 000000 155 355 UPR40500 JOBTITLE ACTINDX 209401 30562 150001 30563 MYTABLE JOBTITLE ACTNUMBR 209401 222-411001-000000-150-350 150001 222-411001-000000-155-355 Sean: If you are storing the account number as a string in my table, an...

Select Query Broken
Does any one know, of the issue in A2k3 With the Query, I was creating some combo list filters, via query's then putting the SQL in a Marco Apply filter. work great then all i sudden, now, when i view the query in normal mode, (NOT Design mode) Its Showing all the fields that are related on the table the query is based on, even though only two fields have been selected. and the show tick is ticked? just for 2, any ideas whats happening here? ive tried repairing and compacting database and also restarting access no luck? On 10 Sep, 16:42, KARL DEWEY <KARLDE...@discussions.microsoft...

Public folders: query regarding the "synchronize now" function
Exchange 2003 SP2 I have a query regarding the "synchronize now" function for public folders. Say I have a public folder called "Bob" with replicas on 3 servers (ServerA, ServerB, ServerC) If I drill down to Folders/Public Folders Select the "BOB" public folder and select the "Status Tab" on say ServerA, I see all 3 replicas listed as expected: If I right click a replica I can select "synchronize now" what does this do exactly? Does it: 1) Push updates out from the replica where you right click and select "synchronize now" ...

Query Button Problem
On my form, I need to put a button to run a query. When using the toolbox in the Design View, I use the Command Button Toolbar, then use MIscellaneous, then Run Query. I select the correct one, and save it to the form. When I try to use it, I get an error message, and it will not work. What is going wrong? Can't figure it out if you don't provide an error message. On Fri, 1 Feb 2008 10:52:00 -0800, Shari <Shari@discussions.microsoft.com> wrote: >On my form, I need to put a button to run a query. When using the toolbox in >the Design View, I use the Command Button To...

criteria for filtering check boxes in a query
I am trying to do a permanent sort for columns using check boxes. I need to know the formula for the criteria box On Wed, 20 Jun 2007 14:54:41 -0700, Desiree wrote: > I am trying to do a permanent sort for columns using check boxes. I need to > know the formula for the criteria box What is "a permanent sort for columns using check boxes". Perhaps your terminology is clear to you, but I think you would do well to re-think and repost your question. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail On Thu, 21 Jun 2007 15:38:03 -0700, Desir...

adding fields in query
I am trying to add fields in a query to put into a new field. For example; FieldOne, FieldTwo, and FieldThree should equal FieldFour. FieldOne has a value of 1, FieldTwo has a value of 2 and FieldThree has a value of 3. When I try =FieldOne+FieldTwo+FieldThree in FieldFour with the expression builder, it does not add them, it just shoves all their values together. Instead of FieldFour having a value of 6 when I run the query, it gives me a value of 123. I have also tried the "&" instead of "+", and I get the same results. I have tried changing the To...

stop returning column headings from DB query
I put together a query to go against Oracle that returns a block of data to the spreadsheet. Is there an option somewhere to have the "Return Data to Excel" do so without also returning the column headings? I want the data only. thanks - Russ There are 2 places that you can change that setting..... 1)When you return data from MS Query the dialog where you select the location for the data has a Properties button. Click that button UNcheck: Include Field Names.......click [OK] Continue selecting the query destination OR 2)After the data has been pulled from Oracle Right-click...

Tranform Pivot Query?
I hv 2 tables with structure as below: [Empl] ID Name 1 Mr A 2 Mr B 3 Mr C 4 Mr D 5 Mr E [Empl_Tran] TrID Empl_ID Date Code 1 1 10/11/2009 SL 2 1 10/11/2009 TR 3 1 11/11/2009 W 4 1 12/11/2009 W 5 1 12/11/2009 TR 6 2 10/11/2009 SL 7 2 10/11/2009 TR 8 2 11/11/2009 W 9 2 12/11/2009 W 10 2 12/11/2009 TR 11 3 10/11/2009 SL 12 3 10/11...

Web query again
Hello, I looked on MSDN about web queries with VBA. But the code I took from there doesn't work. Dim BaseURL As String BaseURL = "some URL" Const StartDate As Date = #11/2/2004#, EndDate As Date = #4/20/2005# Dim d As Date For d = StartDate To EndDate Dim newSheet As New Excel.Worksheet Set newSheet = Worksheets.Add With newSheet .Name = Replace(CStr(d), "/", ".") Call .Activate End With 'MsgBox ("URL;" & BaseURL) 'Next line gives an error 'Run-time error '5': 'Invalid ...

emailing query window type result messages
I'm creating some backup procedures. While testing them in the query window, I'll get messages like this: 100 percent processed. Processed 0 pages for database 'Caser', file 'Caser_Log' on file 1. BACKUP LOG successfully processed 0 pages in 0.097 seconds (0.000 MB/sec). The backup set on file 1 is valid. I knonw how to do this: BACKUP LOG [Caser] TO DISK = @BackupLocationAndName WITH NOFORMAT, NOINIT, NAME = @BackupName, SKIP, REWIND, NOUNLOAD, STATS = 10 SET @Err = @@ERROR IF @Err <> 0 BEGIN EXECUTE msdb.dbo.sp_notify_operator @name = ...

data base query
I have a workbook with 2 work sheets. Eacch contains data from a database query( 2 different databases) Is it possible to create a pivot table from the 2 sheets ? ...

Exporting a Query to Excel
Hi, I have a query of Purchase Oders, sorted by month, for a particular business unit and was wondering if there was a way to export the data to one excel workbook, but to have 12 tabs of monthly data instead of having to separate it out manually. thanks -- C. Williamson Here is some code that I wrote for a poster a few months ago that will do this type of export. You'll need to modify the code so that it will loop through a list of months instead of a list of managers. Post back with questions (and with more details) if you have problems. Generic code to create a temporary qu...

SQL Server 2005: SELECT INTO & pass-through query
Hi I often use pass-throgh queries to get data from external sources - something like following example: ---------------------------------------------- Use MyDaytabase -- Declaring variables DECLARE @SQLString varchar(max) DECLARE @OpenQuery varchar(max) DECLARE @LinkedServer varchar(max) -- Declaring table variables DECLARE @Q1 TABLE( id INTEGER, Field1 DATETIME, Field2 VARCHAR(50), Field3 INTEGER) -- Setting variables SET @LinkedServer = 'MyLinkedServer' SET @OpenQuery = 'SELECT * FROM OPENQUERY(' + @LinkedServer +',''' -- Co...

MS "Query", MS Excel not playing nicely
Using Excel 2000 (9.0.2720), Clicking Data, Get External Data, New Database Query. Not working. Says, "Waiting for data to be returned from Microsoft Query" in the status bar, then pops up a dialog that says, "Microsoft Query could not be started because it isn't installed. You can install Query by running the installation programyou used to install Office or Excel. The Query option is in the Office Tools category." But I *DID* install Query!!! If I set MS Query (in Control Panel, Add/Remove Programs, MS Office) to "install on 1st use", then Excel knows it n...

Report last activity completed, next activity(ies) not completed
Hi everyone! Thank you in advance for at least taking a look at this. CRM has been a great product to use so far but I've run into some difficulty building a report to give the account, last activity completed, and next (highest priority and date created) activity to be worked on. I have all the SQL structure and process figured out to sort the values but I can't for the life of me figure out how activities are related back to an account (or contact, lead, email recpt...ect.) so if anyone could point me in the direction of how to link an activity to an account in the SQL Repor...