Required fields dependant on other field values

ibbledibble

Registered User.
Local time
Today, 23:05
Joined
Sep 29, 2008
Messages
59
Hello

Is there any method to set a field's Required property to 'yes' depending on another field's value in the same table?

I am collecting data on someone's nationality and if I select a certain nationality from a value-list then I want to set other date-fields Required property to 'yes'.

Can this be done?

Thanks
 
assuming you are using a form, then i think you would need to manage this within the form - you cant do this directly in a table, afaik.
(and you cant make a value required for some rows, but not others)

and note that you/your users shouldnt be working directly in the table, if that's what you are doing.
 
You could use the forms Before Update event to check the nationality and other date-fields and dependant on the nationality prompt the user to complete other date-fields if they have not already done so.
 
They're not using tables, they're using forms. I just assumed the solution would be through the table - if it's through the form could you let me know how it's done?

Much appreciated - thank you.
 
Something along the lines of;
Code:
If Me.Nationallity = "Trigger nationality" Then
     If IsNull(Me.YourFiledName) or Me.YourFiledName = 0 [COLOR="SeaGreen"]'Test for empty field[/COLOR]
          MsgBox "This is a required filed please enter a value"
          Me.YourFiledName.SetFocus
          Cancel = True
     End If
End If
 

Users who are viewing this thread

Back
Top Bottom