A
AccessNeophyte
Hi again,
I have a situation that may call for either a multiple nested IIF, or
a Switch(), or a DateDiff, something else I haven't even heard of.
Basically, I need to get the number of days during a given month that
a given client was in residence.
Here's what I need the contol in my report to show:
if [Admit Date]>=[Beginning Date],
then [Ending Date]-[Admit Date]
if [Discharge Date]<=[Ending Date],
then [Discharge Date]-[Beginning Date]
if [Discharge Date]<=[Ending Date] AND [Admit Date]=>[Beginning Date],
then [Discharge Date]-[Admit Date]
if [Discharge Date]>[Ending Date] AND [Admit Date]<[Beginning Date],
then [Ending Date]-[Beginning Date]
Beginning Date is a prompt in the query, and will usually be the first
day of the report month
Ending Date is a prompt in the query, and will usually be the last day
of the report month
Admit Date and Discharge Date are fields from the table that the
query ... um ... queries. ;o}
Thanks in advance!!!
Access Neophyte
I have a situation that may call for either a multiple nested IIF, or
a Switch(), or a DateDiff, something else I haven't even heard of.
Basically, I need to get the number of days during a given month that
a given client was in residence.
Here's what I need the contol in my report to show:
if [Admit Date]>=[Beginning Date],
then [Ending Date]-[Admit Date]
if [Discharge Date]<=[Ending Date],
then [Discharge Date]-[Beginning Date]
if [Discharge Date]<=[Ending Date] AND [Admit Date]=>[Beginning Date],
then [Discharge Date]-[Admit Date]
if [Discharge Date]>[Ending Date] AND [Admit Date]<[Beginning Date],
then [Ending Date]-[Beginning Date]
Beginning Date is a prompt in the query, and will usually be the first
day of the report month
Ending Date is a prompt in the query, and will usually be the last day
of the report month
Admit Date and Discharge Date are fields from the table that the
query ... um ... queries. ;o}
Thanks in advance!!!
Access Neophyte