Tab problem - error "Before typing press Tab or Click" etc.
FM 13 Advanced on PC
I have a set up with a tab control within a tab control. Looking like this
continued.. see image attached
The operator is instructed to delete line1 if they wish to edit it. Then they can set it up again by using the data in the pale blue box. The works fine when I use the inner tab panel exclusively. But when I try to edit from the embedded panel I get an error "Before Typing Press Tab or click in a field or Choose the New Record menu command. Then the screen reverts to the first tab of the first control: Clients.
Any help would be appreciated.
I think it may be simply that no field has the focus. I don't fully understand your workflow, but maybe you need a simple script trigger somewhere (on the panel label) that puts you into a field when you go to this tab panel. Or if some script operates on this tab panel, have the last step leave you in a field or button. But when you do that, just make sure if someone starts typing, they realize what field they are on so they don't trip a script or edit the wrong data.
As Steve as mentioned, you will get this error message if you press a key at a time when no field on the layout as the focus. (The edit cursor will not appear in any field if this is the case.)
That's the strange thing. If I cause a script to run on this panel, by selecting tax or ship, it still won't let me edit Line1. I am trying to figure out what script trigger is running when I go to edit line1..Oh, I know what script is running, I just am not sure where it is being triggered, because the script that causes it to "bomb" (I can see this in debugger) is a little script that is supposed to run on the first tab ("Clients") the resets the directory on the opening frame. This script does impact the current record status, because it opens a different layout. Maybe I can get it to go back to the panel I want to be active???
If you watch in the debugger, you'll see the name of the script trigger at top left above the script steps that appear when it is tripped and starts performing the script.
Sounds like a commit records step in your script is removing the focus from the field.
Oh how I wish the tab controls would just let one designate a script to run!!! A script per tab. Course, that would be just too direct for Filemaker. Everything works just fine as long as I run the second set of tabs by themselves, when not embedded in the first set. When embedded it runs a script I am not even calling, when I try to change the text in Line1. Grrrrrrr!
And what is the script trigger that you are using to run that script?
There are ways to use a global variable to keep trigger performed scripts from doing anything when you don't want them to.
As far as I can tell there was no script trigger running. I had called the script which did run from the first panel (outermost). So I just pulled the embedded tabs out and put a button on top of "out". The button goes to what had been the embedded tab. It's ugly..but it does work as intended when it's not embedded. GRRRRR.
Your last answer is not consistent with your earlier posts where you indicated that a script was being performed and that you could see it in the debugger. Your mention of the debugger tells me that you have Advanced. This tool will enable you to tell what script is being performed and whether it was due to a button or a trigger and which trigger was tripped to perform the script.
What you describe should not be necessary, but there just hasn't been enough detail posted here to tell exactly what you had set up and why you were having this problem.
It is possible, by the way, to set up a script trigger on a tab control that runs different sub scripts depending on which tab was clicked. The precise details on how best to set that up depend on whether you are using FileMaker 11, 12 or 13.
I am using 13, which I specified in the first message of this post.
The script ran in debugger even though I had removed the trigger. That's what I was trying to say. It's the script that takes me off layout.
So maybe, if I have some more instructions on how to do the "possible" you mention in the last paragraph, I can start with a fresh layout and "direct" the tabs to follow a particular script.
I think the layout I have been using is all messed up.
Thanks again for your help Phil. Sorry for my "hissies" !
It is possible, by the way, to set up a script trigger on a tab control that runs different sub scripts depending on which tab was clicked. The precise details on how best to set that up depend on whether you are using FileMaker 11, 12 or 13. ...
Do tell, please!
Retrieving data ...