Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Requery a param. view with date parameters
Message
From
02/07/2002 17:47:28
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00674575
Message ID:
00674740
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
I'm assuming you are using the view designer. One way I can think of to provide the functionality you are asking, would be to set a date range. You will have to add the date field to the designer twice. Once for datefield >= ?ldDate1 and the other for datefield <= ?ldDate2.

Set the dates to a range that will encompass all of the data by programmatically checking for an empty date parameter, or any other value you wish, and assign the parameter values accordingly. If you are querying for a specific date then set each date parameter to the same date.

ldDate1 - Entered by user
ldDate1 = IIF(EMPTY(ldDate1),{^1900/1/1},ldDate1)
ldDate2 = IIF(ldDate1 = {^1900/1/1},{^2050/1/1},ldDate1)


>Hi
>I have a parameterized view with many parameters, that i requery throughout my program. When i want all the values for a specific parameter, i empty it and requery, and this works great. The only problem is that one of the parameters is of type DATE, and when i put in an empty date and requery, it does not show the records for all dates ( wich is what i want ), but i think that it brings me the results for the empty date itself ( i.e no records ). I cannot set it to .NULL. neither, since this will trigger an operand mismatch error...Is there a way ( some value for the date param. for instance ) that i don't know about to bring in the values for all dates in a requery?
>
>TIA
>Jaime
Previous
Reply
Map
View

Click here to load this message in the networking platform