Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Run SQL with edit1 and command1
Message
De
22/09/2004 14:28:03
 
 
À
22/09/2004 08:34:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00944927
Message ID:
00945144
Vues:
20
>Dear professors
>
>I write following select statement in edit1.value
>
>Select * from vouchers
>
>I want to run this command through command button.
>What should I write on the click event of command1 to run codes written in edit1.value.
>

Although the answers you've been given work, a better way to do this is to move the code (the query, in this case) into a custom form method and then have both the editbox and the textbox call that method.

To do this, use Form | New Method from the method. Specify a name for the method (say, GetVouchers). Click Add, then Close.

In the Method Editor, find your new method, GetVouchers, and put the code you want in it.

Then, in the edit1.Valid method (I assume that's what you mean by edit1.value) and in the command1.Click method, put:

ThisForm.GetVouchers()

Tamar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform