Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) @SelectTreeItem (Read 5083 times)
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: @SelectTreeItem
Reply #15 - Nov 3rd, 2004 at 8:00pm
Print Post Print Post  
I have been working on this for a while now, and I don't see anything wrong with the code but the second @Selecttreeitem does not execute, gives no error message.

Var vsuccess as Int
 
vSuccess = @SelectTreeItem("Add Data Menu!Record Commands!Printing Commands!Print Form to Default")
If vSuccess = 0
{
   Writeln("The Print Command Failed")
}   
Else
{
  vSuccess = @SelectTreeItem("Add Data Menu!Navigation!Save Record and Close Form (Shift-F10)")
  If vSuccess = 0
  {
    Writeln("The Save Command Failed")
  }   
}
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: @SelectTreeItem
Reply #16 - Nov 3rd, 2004 at 8:13pm
Print Post Print Post  
@SelectTreeItem will not close the form that it was fired from. You will want to use @Save and @Exit
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: @SelectTreeItem
Reply #17 - Nov 3rd, 2004 at 8:22pm
Print Post Print Post  
Thanks Ray, Back to the book  Grin Grin
  
Back to top
 
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: @SelectTreeItem
Reply #18 - Nov 3rd, 2004 at 9:21pm
Print Post Print Post  
I've tried a few examples of @Exit & @Save and I want to be sure I understand this.

1. @Exit- Exits current form without saving.

2. @Save- Saves current Form and advances to the next Form.

3. Threre's no way to save a form and close it from a command button on the form ?

If not then its something I"d like to see in a future version.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: @SelectTreeItem
Reply #19 - Nov 3rd, 2004 at 9:33pm
Print Post Print Post  
1. Yes that is correct
2. That is also correct
3. You use both @Save and @Exit together.
ex.
Code
Select All
@Save
@Exit 



If you do not want to advance to the next form you can use @SelectTreeItem("Search Update Menu!Navigation!Save Record") and then use @Exit

ex.
Code
Select All
Var vSuccess as Int

vSuccess = @SelectTreeItem("Search Update Menu!Navigation!Save Record")

If vSuccess = 1 Then
{
@Exit
}
Else
{
WriteLN("Save Failed")
}
 



Note you would have to use a different @SelectTreeItem for Add Data mode.
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: @SelectTreeItem
Reply #20 - Nov 3rd, 2004 at 10:08pm
Print Post Print Post  
That did what I was looking for Ray, had my @exit in wrong place. Thanks Much !! Cheesy Cheesy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print