Normal Topic Subform - making sure it's in FormView before savi (Read 1737 times)
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Subform - making sure it's in FormView before savi
Mar 12th, 2009 at 4:55pm
Print Post Print Post  
Main Form - Purch;  Subform - POLines.  

- I want the user to be able to toggle the Subform to Tableview for eyeballing, but I want the Subform to be converted back to a FormView before it is saved.

I have a 'SavePO' command button on Purch, with the following code On Element Entry::
#include "sbasic_include.sbas"

     If (@Mode() = 0) Or (@Mode() = 1)
           {
           If (@FormViewType("POLines") = FORM_VIEW_TYPE_TABLE)
                 {
                       FormViewType("POLines", FORM_VIEW_TYPE_FORM)
                 }
           FormCommit("POLines")
           FormThrowFocus("Purch", "PONotes")
           FormCommit("")
           }

This code, however, will not toggle the POLines subform back to FormView.  This is about the 10th code arrangement I've tried - Where am I going wrong?

Modified*********
the manual says "A form that initially "displays" as a table view form cannot be toggled to use form view" ... I believe my form initially (from a saved state) displays as a Formview - I'll double check it.  
Modified 2***********

Perhaps the way to set it up is to prevent a subform 'save' if it's in Tableview, advising the user to toggle back to Formview and then initiate 'save' again?
« Last Edit: Mar 12th, 2009 at 8:11pm by lksseven »  

Larry
Back to top
IP Logged