Normal Topic Switch to Add Data Mode problem 2.1 (Read 932 times)
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Switch to Add Data Mode problem 2.1
Dec 15th, 2008 at 9:16pm
Print Post Print Post  
I have a command button placed in Search Mode that changes the form to Add Data Mode using the following code that works fine:

vNav = @SelectTreeItem("Search Menu!Switch to Add Data Mode (Ctrl-F6)")

This code also works:

vNav = @SelectTreeItem(@Application + "!Forms!Add Data!DataBase!FormName")

However, if I add @Exit to the next line to either of the above code (I’m only using one or the other) to close the current form, it opens the form in Add Data Mode but puts a dashed line around the first LE entered and forces you to either click inside the element or click anywhere on the form in order to input data into the LE.

If I use the New Button Menu Interface “Add New Records” button it works great. It closes the search form, opens the form in Add Data Mode and you can just start typing data into the LE.

For this particular form I’d like to have an Add New Records command button on the form and not force the user to use the  New Button Menu Interface for this function.  I do want the New Button Menu Interface available for all other functions.

I don’t want to have to click inside the element or click anywhere on the form in order to input data.  Any suggestions on how I can get the curser into the LE as soon as the form opens?

Thanks
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Switch to Add Data Mode problem 2.1
Reply #1 - Dec 15th, 2008 at 9:40pm
Print Post Print Post  
The buttons switch the mode of the current tab. The tree versions open a separate tab. Calling @Exit operates on the original tab (which then goes away) and may therefore leave focus on the menubar instead of on the Add tab you just opened. I'm not sure there's much you can do about that.

Since the user is clicking anyway, and since you are using the Menu Buttons for "all other functions", is there a reason why this particular one is an issue? You seem to be running this code from the retrieve spec where the Add New Records button is very conveniently located.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Switch to Add Data Mode problem 2.1
Reply #2 - Dec 15th, 2008 at 9:59pm
Print Post Print Post  
Thanks for the quick reply. This is what’s happening  “may therefore leave focus on the menubar instead of on the Add tab you just opened”.

The Add New Records button is easy to get to as you stated. It may not become an issue. I sense that adding a new record will be the most used function, and was trying to simply make an Add New Records button in close proximity to where the other buttons and LE’s are located.

In reading over the 2 1 ButtonMenus.pdf, it simply stated that the corresponding menu tree command for Add New Records is: Search Menu!Switch to Add Data Mode (Ctrl-F6) and assumed that it would perform the same function and in the same way.

Thanks for your help.
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Switch to Add Data Mode problem 2.1
Reply #3 - Dec 15th, 2008 at 10:06pm
Print Post Print Post  
The buttons and the tree can't always work the same way. There are cases (like this one) where the buttons have a new behavior, which we think is desirable, but the tree still works exactly as it always did.

If you think Add New is going to be a primary function, perhaps you can put a button for it on your Main Menu form, so User can go there directly?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Switch to Add Data Mode problem 2.1
Reply #4 - Dec 15th, 2008 at 10:15pm
Print Post Print Post  
I guess what I meant was that they would first be searching but when finished would most likely add new data.

I’ll see how it goes.

Thanks
  
Back to top
IP Logged