Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula help? 1

Status
Not open for further replies.

hereigns

MIS
Sep 17, 2002
172
US
Running CR 8.5 Professional

Got a report that retrieves specific fields from an access database that works but I need it to ignore certain criteria and am not sure how to write the formula.

The field I want to "filter" is called:
tblMaster.DateRequested

The report is displaying/printing September 2003 data (can't figure out why) and I'm want to configure the report to ignore September 2003 data but print everything else.

Sounds like a If Else Then statement would be appropriate but not sure what the syntax should be.
 
If tblMaster.DateRequested is a Date field, then you can alter your Record Selection formula (Report > Edit Selection Formula > Record) to something like this:

not ({tblMaster.DateRequested} in [CDate("9/1/03") to CDate("9/30/03")])

-dave
 
Dave,
Thank you for your reply. I tried your syntax but when I check the formula I get back an error:

"string is required" prior to the left bracket [

I'm a "rookie" and am not sure what I did wrong.
 
I think that means that your DateRequested is a string. If it's in an acceptable format (like m/d/yy), then this should work:

not (CDate({tblMaster.DateRequested}) in [CDate("9/1/03") to CDate("9/30/03")])

-dave

 
That worked! Thank you very much for your assistance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top