Author: Stephen Russell
Posted: 2009-03-26 at 14:31:45
On Thu, Mar 26, 2009 at 1:22 PM, Jim Harvey <jharvey@hanoverpa.com> wrote:
> I'd like to update a field value by allowing the user to click a button that
> has a value as it's caption.
>
> There will be multiple buttons each with its own distinct value.
>
> I can put code in the click of each button knowing it's assigned value, and
> that will do the job, but would rather use a form method.
>
> Is there a way to have the method determine which button was clicked, and
> therefore assign the new value to the field.
>
> The code I'm using now in the button.click is:
>
> SELECT bidboard
>
> UPDATE bidboard SET amount = 6000
>
> llok = tableupdate(1,.f.,'bidboard')
>
> thisform.refresh
-----------------------------
just a guess here:
Click event for each button calls a single method with a param that
states the button.text
You can then use a CASE to separate the code that is unique to the button.
HTH
--
Stephen Russell
Sr. Production Systems Programmer
Web and Windows Development
Independent Contractor
Memphis TN
901.246-0159