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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Parameter

Status
Not open for further replies.

Lanie

Programmer
Jan 20, 2000
83
US
I'm going crazy and just can't see where I am going wrong.
I need to allow the user to pull this report based on a date range (a beginning date and then an end date.)

In my report I have many fields, but I have one date field in my report which is DATE_ENTERED (formated date/time).

I set up a Parameter Field (DateRange) set to date/time and range values. I pulled the DateRange field into the report.

It lookes for the range which is a date and then the time (even though I don't want the time) and then pull EVERYTHING - NOT JUST THE DATE RANGE THAT I INPUT.

I thought this would be the best way -but I must be very very wrong. I guess I really need some help here.

Thank you all so much.
Lanie Lanie
laniet@ij.net
etroidl@conaxfl.com


 
Add to your record selection critera:

{MyTable.MyDateField} in {?MyDateParameter}

or

({MyTable.MyDateField} >= minimum({?MyDateParameter})
and
{MyTable.MyDateField} <= maximum({?MyDateParameter}))

If you don't want time as an option in the parameter, change it to a DATE only parameter.

-k kai@informeddatadecisions.com
 
In case you used 2 dates as parameters rather than a single date range (I wasn't sure when I checked the post again), if so, use this as your record selection criteria:

({MyTable.MyDateField} >= {?MyStartDateParameter}
and
{MyTable.MyDateField} <= {?MyEndDateParameter})

-k kai@informeddatadecisions.com
 
synapsevampire:

Thank you so much. I set in your second recommendation and it worked first time thru.

Again, thank you so much ! Lanie
laniet@ij.net
etroidl@conaxfl.com


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top