>Hi everyone;
>
>A newbie question:
>
>I'm trying to create a form which will accept a parameter, and then show a grid with records from a table matching that parameter. So, if I pass a certain customer acct to the form, I'd like to filter the grid to have just those.
>
>-I've put a parameters line in the init of the form.
>- I'm assigning the parameter value to thisform.cAcct
>
>I'm not sure how to set the dataenvironment because when I try to set the filter to thisform.cAcct I get an error "Thisform is available only in a method".
>
>I've also tried to use parameterized views or just set the controlsource of the grid to an SQL statement but I'm always getting errors.
>
>Anyone can point me to the right direction?
>Thanks everyone,
>
>Alen
There are several ways of solving your problem. If you want to make a view, load it with NoDataOnLoad (there is a property in data environment). After you receive your parameter, in form's Init you'll do
vp_MyParameter = thisform.cCustomer_ID
requery('MyView')
Your grid will display all data for that customer.
If it's not broken, fix it until it is.
My Blog