Connecting Tech Pros Worldwide Help | Site Map

Required Field

  #1  
Old November 13th, 2005, 09:30 AM
kufre
Guest
 
Posts: n/a
I want to make some field required if a condition is true. Example, If
txtSubNumber is equal to 2 or greater, I want
txtOriginalSubmissionDate to be required.

  #2  
Old November 13th, 2005, 09:30 AM
pietlinden@hotmail.com
Guest
 
Posts: n/a

re: Required Field


You can only do that in a form. One way to do it would be to use the
AfterUpdate (I think) event of txtSubNumber and in it to set the focus
on txtOriginalSubmissionDate and then don't let the user off the field
unless a valid date is entered.

  #3  
Old November 13th, 2005, 09:31 AM
Mark
Guest
 
Posts: n/a

re: Required Field


Open the table in design view and view the table properties.
In the validation rule of the table enter something like:
IIf([field1]>=2,[field2] Is Not Null)
Then in the validation text property, something like:
"You need to enter a value"

Make sure the default value of field2 is set to null.

If you then enter a value in field1 greater or equal to 2 and try to move
onto another record, a message will appear informing you that a value needs
to be entered into field2.

Mark

"kufre" <kufreanaka@yahoo.com> wrote in message
news:1112045232.012939.169700@f14g2000cwb.googlegr oups.com...
I want to make some field required if a condition is true. Example, If
txtSubNumber is equal to 2 or greater, I want
txtOriginalSubmissionDate to be required.


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Required field / error with null value / can't move focus kiwipedia answers 6 June 5th, 2007 07:13 AM
Required Field validator stops a readonly textbox even if data is there. nimeshdotnet answers 0 February 20th, 2007 08:50 AM
Required Field Validator Does Not Block Postback dinsdale answers 0 September 22nd, 2006 05:55 PM
Required field on a form Orchid answers 3 November 13th, 2005 10:12 AM
Required Field Validator (ASP.NET) MrMike answers 2 July 21st, 2005 07:52 PM