Thanks for setting me straight regarding the variable setting. In retrospect
it seems pretty obvious. Unfortunately my working knowledge of R:Base
is from the 4.5 days with the pieces added bringing me to 7.6. Overall
the app conversion from 4.5 to 7.6 has gone pretty well thanks to everyone
on this forum and the great folks at R:Base. I am enhancing the app where I
can without burdening the forum. I also found the tutorial helpful.
Also thanks to Victor about adding the variable in the form. I was already
there but appreciate the extra care and guidance.
I still have an issue and this may be my lack of knowledge about when
eep's fire and/or variables. A little background about this form first.
It's a three table form always in edit. The user is prompted for account code
in the first table (Acctprom) and this brings up all of that account's rent
records from the Rentroll table. The Rentroll table is my scrolling region.
This is where I am adding the BankDate Bit Button.
Finally I also display the account balance from a third table (Balate) which
is also used throughout my application for report selections and other reasons.
The account balance is dynamically updated in this form as the user applies
rent receipts.
Per Karen's advice, I removed Bernie's suggestions....i.e. component id in
scrolling region and his suggested eep on the BankDate Bit button. It was
replaced with:
update rentroll set bankdate = .bankp where rowid = .vrowid
recalc var
return
I also created the variable vrowid = rowid This is created in the rentroll
section of my variables and is the 2nd variable created before some other
processing that occurs using variables.
If I click the Bit Button, nothing changes on the screen until I scroll down
to the next line in the region at which point the bankdate field on the
screen is updated as desired. Is there a way to make the bankdate field
refresh and show the bankdate update after the Bit Button is pushed in the
specific row.
Thanks,
Ed
Aug 3, 2009 08:02:10 AM, [email protected] wrote:
Ed: The reason your eep doesn't work is the first row -- your "set var"
line gets the value of the first row in RentRoll, not the row you are on.
If you set up a form variable
vRowID = RowID
then that's all you need for your "update" command to work properly. If
you do that then you don't have to mess about with componentIDs.
Karen
Here's the custom eep code
set var vrowid = rowid in rentroll
update rentroll set bankdate = .bankp where rowid = .vrowid
recalc var
return

