Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameters
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00594753
Message ID:
00594761
Views:
15
This message has been marked as the solution to the initial question of the thread.
>When creating a view in the view designer, what do I do if I want to use a parameter, but not have the user be prompted for it? In other words, if I already have a variable with contains the value I want to use, how do I represent this in the view designer? (Instead of ?Name, which would prompt the user to enter a name, I want it to just use the variable value at runtime.)
>
>Thanks,

Hi Patric,

You don't need to do anything with the view. All you need to make sure that the variable which is your view parameter (?lcName) exists, has the desired value, and is in scope of the method/procedure where you open or requery your view. If the view parameter variable exists, the prompt will not appear.

An example:

The view SQL:
SELECT Delivery.orderno, Delivery.lname, Delivery.fname;
 FROM appdata!delivery;
 WHERE Delivery.fname = ?lcname
The code:
lcName = "John"
use view1 in 0
browse
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform