Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View with a variable filter
Message
From
22/01/2003 14:36:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
22/01/2003 14:14:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00744409
Message ID:
00744430
Views:
14
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all...
>I have a view filtered by a ?xVar variable.
>I have a form with the Data Environment set to that view. Problem is, everytime I try to open the form, a window pops up asking for the value of the variable, which I don't want because the value is selected by the user from a Combo box. A way around this is declaring the variable and asigning it a ' ' value in the button that opens the form, before the DO FORM command. This works OK but I feel there should be a more 'elegant' solution to this. Some one said that 'if it works, it's OK', but still I'd like to see a different aproach.
>
>Thank you for your time.
>Ulises

That is the way the view parameters works - you have to declare it before opening the view, or else you get the undesired dialog.

Note that you can also initially open the view with:
USE MyView NODATA
and later define the variable, and requery().

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform