>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement