Normal Topic Forcing order of entry (Read 650 times)
addison1
Member
*
Offline


No personal text

Posts: 43
Joined: Aug 1st, 2004
Forcing order of entry
Nov 21st, 2005 at 11:27pm
Print Post Print Post  
I have a form with 20 elements. When the form opens I want to prevent entry to all but one field.
The reason for this is that when the user makes an entry to the "correct" element then most of the other data is brought to this form by virtue of several xlookups.
So the global code includes a subroutine that gives an internal error message, clears "ThisElement",
"ThrowFocus" to the correct element. Each of the elements then contains the subroutine "on element immediate change"
The program works just fine. My question is; do I have to make the "on element immediate change" entry for each and every element or is there some way to program a bunch of elements do the same thing?
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Forcing order of entry
Reply #1 - Nov 22nd, 2005 at 2:43am
Print Post Print Post  
You can put the function subroutine call in the on element entry event for the form itself. It will run whenever any element on the form is entered. You can put it in the on immediate change event for the form itself. Be very careful putting it there in that it will run if anything changes.
  

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


No personal text

Posts: 43
Joined: Aug 1st, 2004
Re: Forcing order of entry
Reply #2 - Nov 22nd, 2005 at 6:59pm
Print Post Print Post  
Then how do I prevent it from running on the 1 element that is the "correct" element?
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Forcing order of entry
Reply #3 - Nov 22nd, 2005 at 7:13pm
Print Post Print Post  
I believe you can check either @CurrentElement() or @ElementName(ThisElement). If the name matches the name of the correct element then do not run your code.

-Ray
  

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


No personal text

Posts: 43
Joined: Aug 1st, 2004
Re: Forcing order of entry
Reply #4 - Nov 23rd, 2005 at 8:39pm
Print Post Print Post  
Thanks Ray, I'll try it
Fred Gladstone
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Forcing order of entry
Reply #5 - Nov 28th, 2005 at 2:49pm
Print Post Print Post  
Fred,

Hey, how you are you doing?

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged