Creating a Parameterized View Use the CREATE SQL VIEW command with a "?" symbol and a parameter. OPEN DATABASE testdata CREATE SQL VIEW customer_remote_view ; CONNECTION remote_01 ; AS SELECT * FROM customer ; WHERE customer.country = ?cCountry You can supply a value for ?cCountry programmatically when you use the view. For example, you could type the following code: cCountry = 'Sweden' USE Testdata!customer_remote_view IN 0 BROWSE Visual FoxPro displays the customer records for Swedish companies in the Browse window for Customer_remote_view. Tip If your parameter is an expression, enclose the parameter expression in parentheses. This allows the entire expression to be evaluated as part of the parameter. Prompting for User Input of a Parameter Value If your parameter is not a variable or expression, you might want to prompt the user to supply the parameter value by using a quoted string as your view parameter. When you create a view parameter using a quoted string after the "?" symbol, Visual FoxPro does not interpret the string as an expression. Rather, you are prompted to enter the value for the parameter at run time. For example, the following code creates a parameterized remote view that prompts the user to supply a value for the ?'my customer id' parameter: OPEN DATABASE testdata CREATE SQL VIEW customer_remote_view ; CONNECTION remote_01 ; AS SELECT * FROM customer ; WHERE customer.cust_id = ?'my customer id' USE customer_remote_view When you use the view in the previous example, the View Parameter dialog box is displayed. After you enter a valid customer ID, Visual FoxPro retrieves the record that matches that ID. If you enter the value "ALFKI" in the previous example and then browse Customer_remote_view, you see the customer record displayed in the Browse window. By using a quoted string as a view parameter, you ensure that Visual FoxPro will always prompt the user for the parameter value.Aashish