Required data in form

Carl_R

Registered User.
Local time
Today, 11:08
Joined
Aug 16, 2002
Messages
82
I have a text box called 'ClosedDate'
If the CheckBox 'Closed' is checked on the form, ClosedDate appears.

If Me.Closed = 0 Then
Me.ClosedDate.Visible = False
Else
Me.ClosedDate.Visible = True
End If

This works great except input is required in ClosedDate so even if it is not visible, input is still required :( (the field property 'Required' is set to YES in the table).

Is it possible to code that if ClosedDate is not visible, input is not required for ClosedDate?
 
Can you not set the required property in the table to 'no'?
 
If Visible...

Thanks for the reply.

I could but I actually want the field ClosedDate to have required input... but only if it is visible on the form.

If it's not visible, the user would not see it and therefore input should not be required.
 
What if when the text box is hidden you write a default value of some obviously false date or info, so that you can tell in the table to which it writes that no closing date was given.

Path
 
A way to require the user to input something in it is to check for a value in the box when the information on the form is submitted. If the field is empty, have a message box pop up telling them the field is required. This way you can set the required property to 'no'.
 

Users who are viewing this thread

Back
Top Bottom