From: Rebeca on
could someone please tell me how to write the criteria for DSUM where
the first criteria is date1 < date 2 and the second critera is date 1
>= date3

I'm getting Null for a total. This is what I have :

=DSum("total1","SN AR Log Query2","Physician = '" & [Physician] & "'"
& "AND [batch date] >= #" & [BeginningARDate] & "# AND #" & [batch
date]<[reportStartDate] & "#")

Thank you :)
From: Douglas J. Steele on
=DSum("total1","SN AR Log Query2","Physician = '" & [Physician] & "'"
& "AND [batch date] >= #" & [BeginningARDate] & "# AND [batch
date]<[reportStartDate]")


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


"Rebeca" <rwfrhs(a)gmail.com> wrote in message
news:6fa859eb-2b25-40fa-ae4d-6a98432a65dc(a)t20g2000yqe.googlegroups.com...
> could someone please tell me how to write the criteria for DSUM where
> the first criteria is date1 < date 2 and the second critera is date 1
>>= date3
>
> I'm getting Null for a total. This is what I have :
>
> =DSum("total1","SN AR Log Query2","Physician = '" & [Physician] & "'"
> & "AND [batch date] >= #" & [BeginningARDate] & "# AND #" & [batch
> date]<[reportStartDate] & "#")
>
> Thank you :)


From: Rebeca on
On Mar 18, 4:23 pm, "Douglas J. Steele"
<NOSPAM_djsteele(a)NOSPAM_gmail.com> wrote:
> =DSum("total1","SN AR Log Query2","Physician = '" & [Physician] & "'"
> & "AND [batch date] >= #" & [BeginningARDate] & "# AND [batch
> date]<[reportStartDate]")
>
> --
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no private e-mails, please)
>
> "Rebeca" <rwf...(a)gmail.com> wrote in message
>
> news:6fa859eb-2b25-40fa-ae4d-6a98432a65dc(a)t20g2000yqe.googlegroups.com...
>
>
>
> > could someone please tell me how to write the criteria for DSUM where
> > the first criteria is date1 < date 2 and the second critera is date 1
> >>=  date3
>
> > I'm getting Null for a total.  This is what I have :
>
> > =DSum("total1","SN AR Log Query2","Physician = '" & [Physician] & "'"
> > & "AND [batch date] >= #" & [BeginningARDate] & "# AND #" & [batch
> > date]<[reportStartDate] & "#")
>
> > Thank you :)- Hide quoted text -
>
> - Show quoted text -

One little ampersand....LOL, who knew. Anyway, I am getting #error on
this now. I am placing this in a text field on a report. I'm thinking
that the problem is [batch date] as according to my formula, it is
looking at the report. How do I rework this to look at the "batch
date" field in SN AR Log Query2 instead? Or am I offbase?

Thanks!
From: Rebeca on
On Mar 18, 4:23 pm, "Douglas J. Steele"
<NOSPAM_djsteele(a)NOSPAM_gmail.com> wrote:
> =DSum("total1","SN AR Log Query2","Physician = '" & [Physician] & "'"
> & "AND [batch date] >= #" & [BeginningARDate] & "# AND [batch
> date]<[reportStartDate]")
>
> --
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no private e-mails, please)
>
> "Rebeca" <rwf...(a)gmail.com> wrote in message
>
> news:6fa859eb-2b25-40fa-ae4d-6a98432a65dc(a)t20g2000yqe.googlegroups.com...
>
>
>
> > could someone please tell me how to write the criteria for DSUM where
> > the first criteria is date1 < date 2 and the second critera is date 1
> >>=  date3
>
> > I'm getting Null for a total.  This is what I have :
>
> > =DSum("total1","SN AR Log Query2","Physician = '" & [Physician] & "'"
> > & "AND [batch date] >= #" & [BeginningARDate] & "# AND #" & [batch
> > date]<[reportStartDate] & "#")
>
> > Thank you :)- Hide quoted text -
>
> - Show quoted text -

One little ampersand...who knew, LOL! Works great thank you :)
 | 
Pages: 1
Prev: functions in criteria
Next: Adding variables