Solved

Blocking data entry

Posted on 2007-11-15
3
187 Views
Last Modified: 2013-12-18
Have a field which asks the user if they are a registered representative. Have another field which asks for their agent_ID, I know how to force the input if the response to the initial registered representative question is yes, but how do I block the input of the field if the response is No.  Can entry to a field be prohibited with explanation as to why they are not allowed to enter a value.
0
Comment
Question by:jforget1
3 Comments
 
LVL 22

Accepted Solution

by:
Bill-Hanson earned 500 total points
ID: 20289269
Sure.

One way is to hide the field when input is not required and show it when it is.  Here's an example:

Say you have a radio button named "registered_Rep" that has the choices "Yes" and "No".  The dependent field is named "agent_ID" and will only be visible if "registered_Rep" contains "Yes".  If "registered_Rep" contains "No", then the "agent_ID" field is hidden and is replaced by a message stating "Agent ID is not required".

To make this happen, you would need to place this hide-when formula on the field:

registered_Rep != "Yes";

Then, on a separate line (probably right under the field), add the text "Agent ID is not required" and place this hide-when formula on the text:

registered_Rep = "Yes";

To enter a hide-formula, place your mouse cursor on the paragraph to hide and display the properties window (Edit \ Properties).  In the properties window, switch to the "Hide-When" tab.  Check the "Hide paragraph if formula is true" checkbox and enter the formula in the field.  Hide-formulas are applied to block paragraphs (like a table cell or paragraph of text).

Now, we need to tell the "registered_Rep" field to refresh the form each time it is changed so that the hide-formulas will be re-evaluated.  To do this, select the "registered_Rep" field and display it's properties window (View \ Properties).  Now switch to the 2nd tab (Control) and select the "Refresh fields on keyword change" checkbox. Lastly, for radio-buttons, we need to enable an additional property.  Switch to the 3rd tab (Advanced) and select the "Run Exiting/OnChange events after value change" checkbox.

That should do it.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 20289375
You can use a simple hide when.  In that case, you must have your controlling field be a checkbox or radio button with "refresh on change" turned on.

Another way is via the Entering event or the similar onFocus event. You can put in code there to check the controlling field, and if it is not set, then remove focus from the field.  The user can try to enter it but will never succeed.
0
 

Author Comment

by:jforget1
ID: 20289538
I don't know why that did not occur to me, started thinking specifically of the validation area and not of just using a good old hide/when.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now