Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run SQL with edit1 and command1
Message
From
22/09/2004 14:28:03
 
 
To
22/09/2004 08:34:14
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00944927
Message ID:
00945144
Views:
21
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform