Thanks Stephen for suggesting that "old school" gem.  What I did was to put a 
NEXTROW command as an "on tab change" eep on the 1st page tab, which has my 
Sales info.  So if someone changes a Payment on tab 2, or changes an Item price 
on tab 3, and then clicks onto the tab 1 header without actually "saving" the 
data yet, it will do a "nextrow" sort of behind the scenes which will save that 
info.  The "save row" eep of the associated Payment or SalesDetail table is 
then triggered which updates the Sales table and refreshes the table.  

Works like a champ, and it's a one-word eep!

Karen

 

 

 

-----Original Message-----
From: Stephen Markson <[email protected]>
To: karentellef <[email protected]>
Sent: Wed, Aug 26, 2015 8:31 am
Subject: [RBASE-L] - Re: Need help with multi-tab form


  
   
Hi Karen,
   
 
   
I used to use PREVTAB/NEXTTAB or PREVROW/NEXTROW (in a scrolling region) quite 
a bit too. This is a bit different though. Just putting PREVTAB in the “On Tab 
Change” EEP for your tab 1 should trigger your Payments table’s "on row save" 
eep.
   
 
   
 
   
Regards,
   
 
   
Stephen Markson
   
The Pharmacy Examining Board of Canada
   
416.979.2431 x251
   
 
   
From: [email protected] [mailto:[email protected]] On Behalf Of Karen Tellef
 Sent: August-25-15 12:08 PM
 To: Stephen Markson
 Subject: [RBASE-L] - Re: Need help with multi-tab form
   
 
   
Ahhh!  The old PREVTAB/NEXTTAB trick!  I remember using that frequently in 
older apps.  It is possible it would work here, especially because I KNOW this 
form is only brought up for 1 Sale at a time.
 
 I'm going to try this!
 
 Karen
   
    
 
   
   
    
 
   
   
    
 
   
   
    
-----Original Message-----
 From: Stephen Markson <[email protected]>
 To: karentellef <[email protected]>
 Sent: Tue, Aug 25, 2015 10:56 am
 Subject: [RBASE-L] - RE: Need help with multi-tab form
    
     
      
       
Hi Karen,
      
      
       
 
      
      
       
Our main form has three tabs and I have set it up so that all changes are saved 
when switching tabs. I have done this is by using the PREVTAB and NEXTTAB 
commands in the “On Tab Change” (when the tab is selected) EEP for the 
“Enhanced Tab Page” for all tabs (pages). I believe that when you use PREVTAB 
and NEXTTAB commands, any changes in the current table are saved.
      
      
       
 
      
      
       
We have three pages that serve three separate tables (in order): Person; 
LevelInfo; Exam. Here is the aforementioned EEP for the tab serving the Person 
table:
      
      
       
 
      
      
       
IF RBTI_FORM_TBLNAME='Person' THEN
      
      
       
  RETURN
      
      
       
ENDIF
      
      
       
IF RBTI_FORM_TBLNAME='LevelInfo' THEN
      
      
       
  PREVTAB
      
      
       
  RETURN
      
      
       
ENDIF
      
      
       
IF RBTI_FORM_TBLNAME='Exam' THEN
      
      
       
  NEXTTAB
      
      
       
  RETURN
      
      
       
ENDIF
      
      
       
 
      
      
       
I hope that helps!
      
      
       
 
      
      
       
 
      
      
       
Regards,
      
      
       
 
      
      
       
Stephen Markson
      
      
       
The Pharmacy Examining Board of Canada
      
      
       
416.979.2431 x251
      
      
       
 
      
      
       
From: [email protected] [mailto:[email protected]] On Behalf Of Karen Tellef
 Sent: August-25-15 10:33 AM
 To: Stephen Markson
 Subject: [RBASE-L] - Need help with multi-tab form
      
      
       
 
      
      
       
My dilemna:  very old (1980s) RBase database, designed by someone other than 
me.  Not very relational in that there is a Sales table and a Payments table, 
but there is a column called TotalPayments in the Sales table that has a total 
of the payments so that a computed column Balance can be calculated.
 
 In the DOS system, there is a separate form for Payments, so on closing that 
form it's very easy to compute the total payments and update the Sales table 
before bringing the Sales form back up.
 
 In 9.5, they LOVE the idea of a form with multiple tabs, so I have Sales on 
tab 1, and Payments on tab 2.
 
 Here's what works:  If you're in Payments, I have an "on row save" eep so that 
if they change the amount it sums the payments, updates the Sales table and 
refreshes the Sales table.  So if you save the row and then click back into tab 
1, viola it's there.
 
 What doesn't work:   If you change a Payment amount and, while still in that 
row, click to tab 1, your row is not yet saved so nothing has been changed.  I 
can see that if I then physically click into a Sales field on tab 1, it then 
saves my payments and does a refresh.  But just clicking on the tab 1 header 
does not save the data.
         I tried putting identical code in the "on leave section" of Payments, 
but that does not evaluate if you click to another tab or even if you [esc] out 
of the form.
 
 I know I can do something like trap the payment going into the field, trap it 
going out of the field, and if it's different than do a "saverow", but that 
takes away the ability of the user to change their mind about the change.
 What I also tried:  I can do a "change tab eep" on tab 1 so that it puts focus 
into a Sales field.  That works cuz it forces a save.  Only issue is that this 
client worries about people making inadvertent changes so they don't want them 
put "into" the data unless they click.  So unless I add a "dummy" field into 
the table.....
 
 Any other ideas?
 
 Karen
      
     
    
   
  
 

Reply via email to