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.
James E Harvey
Hanover Shoe Farms, Inc.
M.I.S./Corresponding Officer
Off: 717-637-8931
fax: 717-637-6766
email: [email protected]
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Jim Harvey
Sent: Thursday, March 26, 2009 1:22 PM
To: 'ProFox Email List'
Subject: Update field value
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
James E Harvey
Hanover Shoe Farms, Inc.
M.I.S./Corresponding Officer
Off: 717-637-8931
fax: 717-637-6766
email: [email protected]
[excessive quoting removed by server]
_______________________________________________
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/00c501c9b14d$1d271af0$577550...@com
** 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.