Normal Topic @selectTreeitem (Read 781 times)
billgordon
Junior Member
**
Offline


No personal text

Posts: 61
Joined: Dec 31st, 2003
@selectTreeitem
Mar 14th, 2004 at 4:16am
Print Post Print Post  
I am trying to simply save a record and exit the form. I am in the add data mode with this on a command button with on element entry.

var vsavebutton as int

vsavebutton = @selectTreeitem ("Add Data Menu!Navigation!Save Record and Close Form (Shift-F10)")

What do I have wrong ?   

Thanks for any help you can give me.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @selectTreeitem
Reply #1 - Mar 14th, 2004 at 2:37pm
Print Post Print Post  
It does save the record, but event programming is not allowed to close the form from which it is running.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
billgordon
Junior Member
**
Offline


No personal text

Posts: 61
Joined: Dec 31st, 2003
Re: @selectTreeitem
Reply #2 - Mar 14th, 2004 at 5:23pm
Print Post Print Post  
My goal was to have a simple way for someone to be in a record (search/update mode) press a button that brings them to add a new customer and then a button to close the add form and exit back to the search/update. (my original thought of just pressing F10 would not work because you need to be at the last record for it to add a new record)

So I used this to leave search/update and take me to new.

var vAddNEWCustomer as Int

If @Askuser("Add a new customer?","","") Then
vAddNEWCustomer = @selectTreeItem("MYSESAME!Forms!Add Data!Customers!Data")

Then I thought this would save the data and close the form and I was going to add another  @selectTreeitem  under this to go back to were I was in search update.

var vsavebutton as int

vsavebutton = @selectTreeitem ("Add Data Menu!Navigation!Save Record and Close Form (Shift-F10)")

Quote:
It does save the record, but event programming is not allowed to close the form from which it is running.


ARE YOU SAYING THERE IS NO WAY OTHER THEN USING THE CONFUSING COMMAND BAR FOR ME TO ACCOMPLISH THE GOAL?

Thanks for the help.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @selectTreeitem
Reply #3 - Mar 14th, 2004 at 5:38pm
Print Post Print Post  
You can go to any form in any of the modes using @SelectTreeItem in event programming. What you can't do is close the form/mode you are on. So if your goal is to navigate without the tree, it can be accomplished easily.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
billgordon
Junior Member
**
Offline


No personal text

Posts: 61
Joined: Dec 31st, 2003
Re: @selectTreeitem
Reply #4 - Mar 14th, 2004 at 5:48pm
Print Post Print Post  
I am sorry but I do not understand. Without the ability to close do I just leave the forms all open. Does this affect performance or anything else bad or am I missing something here?

Thanks Again
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @selectTreeitem
Reply #5 - Mar 14th, 2004 at 5:52pm
Print Post Print Post  
No, as a matter of fact, overall it improves performance to leave them open - in that they do not have to be reopened the next time they are accessed.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged