Click to See Complete Forum and Search --> : CR9 Date Parameter - Retrive Records from Multiple Fields


CrystalBabysteps
February 26th, 2007, 02:54 AM
I am having a table which has "previousDate", "nextDate" fields in it (Date/Time - Access 2003). In CR9 I created a datetype parameter (SelDt). Now I want to set the parameter to connect to both the above two fields datefields. I opened the select expert and selected the previousDate. Then I opened the formula Editor found in the select expert dialog and added

"or {Table1.nextDate} ={?selDt} " without quotes

assuming it would check for both the fileds and populate the records accordingly. The final code/formula looks like this

"{Table1.previousDate} ={?selDt} or {Table1.nextDate} ={?selDt} " without quotes

when I ran the report I saw all the records being displayed instead of the ones being selected by the user from the prompt dialog. Individually if only one field is used in the parameter it works fine, but when combined it throws out all data.
Note: I donot want to use two parameters.
Any ideas where I am going wrong.

gjack72
March 1st, 2007, 05:54 PM
Do you want to show records where the parameter date is in both fields?
If so you need to use "And" where both expressions have to be true.


({Table1.previousDate} ={?selDt} And {Table1.nextDate} ={?selDt})


Hope that helps.