On Mon, Mar 30, 2009 at 10:35 AM, Jim Harvey <[email protected]> wrote:
> I ended up creating a form property, and then in each button's click I
> assigned the value of the caption of each button and called the method.
>
>
> thisform.r_bid = VAL(This.Caption)
> thisform.m_bb
>
> In the method I used the form property to update the amount in the table,
> and was able to see the new value in a separate independent form.
>
> SELECT bidboard
> UPDATE bidboard SET amount = thisform.r_bid
> llok = tableupdate(1,.f.,'bidboard')
> if ! llok
>        aerror(laErr)
>        messagebox(laErr[1,2],16,'Syndicate Table update failed')
> endif
> thisform.refresh
>
>
> This way didn't require a case statement.
-----------------------------------------------------------

So you have to write the same code in each button click and get the
proper reference to the correct property "thisform.r_bid".

Poor reuse here and any change has to be propagated to a number of click events.

But if you have it done, why go back and fix it?  ;->

-- 
Stephen Russell
Sr. Production Systems Programmer
Web and Windows Development
Independent Contractor
Memphis TN

901.246-0159

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to