Re: Third time's a charm? Date query question
- From: "John Spencer" <spencer@xxxxxxxxx>
- Date: Thu, 20 Apr 2006 16:15:35 -0400
First: What is ExpDateFormatter? It looks as if it is a field. If it is a
field is it a date field or text field that contains a string that looks
like a date?
Try breaking your statement down into parts and testing each part. For
instance, does this work or do you get an error>
Month2: IIF(DateValue([ExpDateFormatter) < DateAdd("M",1,[Last Day of the
Period]), True, False)
How about
Calc1: [qryPBMRateNext.Honor]+[qryPBMRateNext.Discount]
Calc2: [qryPBMRateOrig.Honor]+[qryPBMRateOrig.Discount]
Those both should fail as the appear to be incorrectly bracketed.
They should probably be
Calc1: [qryPBMRateNext].[Honor]+[qryPBMRateNext].[Discount]
Calc2: [qryPBMRateOrig].[Honor]+[qryPBMRateOrig].[Discount]
Now if all the parts are working, you can assemble them into a whole. If
one of them fails, then you can start working on the reason for the failure.
Month2: IIF(DateValue([ExpDateFormatter) < DateAdd("M",1,[Last Day of the
Period]), [qryPBMRateNext].[Honor]+[qryPBMRateNext].[Discount],
[qryPBMRateOrig].[Honor]+[qryPBMRateOrig].[Discount])
"Tim Whitley" <TimWhitley@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:39B16A5D-3FA1-4887-AF8A-E8BBF487485B@xxxxxxxxxxxxxxxx
The following query should evaluate the Expiration Date
("ExpDateFormatter",
originally a string value, now formatted in a separate field as a
"mm/dd/yyyy" date) and compare it to the "last day of the period" (a
variable) plus one month. I keep getting an error stating this expression
is
too complex. How can I fix this and will the code work if fixed? I'm a
newbie so I really need the preschool version.
I will eventually have to replicate this for 12 months of forecasting.
Month 2: IIf([ExpDateFormatter]<DateAdd("m",1,[Last Day of the
Period]),[qryPBMRateNext.Honor]+[qryPBMRateNext.Discount],[qryPBMRateOrig.Honor]+[qryPBMRateOrig.Discount])
I appreciate those who have already tried to help me ( I almost feel
beyond
help) but I really need a workable solution)
.
- Follow-Ups:
- Re: Third time's a charm? Date query question
- From: John Spencer
- Re: Third time's a charm? Date query question
- Prev by Date: Re: Do I have to have equal number of records in each table to combine them?
- Next by Date: Re: wildcards in parameter queries don't work -access 2003
- Previous by thread: SELECT DISTINCT or something else.
- Next by thread: Re: Third time's a charm? Date query question
- Index(es):
Relevant Pages
|