Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie question
Message
 
 
À
21/11/2005 22:46:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01071036
Message ID:
01071062
Vues:
18
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform