T
Tom
I am in the process of desiging a method to validate data
input in the TABLE FORM VIEW. The data validation in e.g.
field Y should be based on data in field X.
I rather not want to use the "data default" values since I
have too many data options that would drive the acceptable
value in the dependent field.
Instead, I'd like to use a module (please see sample
below) in which I can put all the data dependencies.
So, my questions are:
1. If possible, how do I link a module to a table?
2. If yes, what should be the table properties?
3. Did I write the module code properly in order to
create/validate in the table?
*************** MODULE *************
Public Function DataDependencies(LOCATION As Variant, TEST
As Variant) As Variant
If LOCATION = "ACO" Then
TEST = "testing ACO"
End If
If LOCATION = "ACT" or LOCATION "FP" Then
TEST = "testing ACT"
End If
If LOCATION = "NSO" Then
TEST = "testing NSO"
End If
End Function
**************
So, here I'd like to create a dependency between
field "LOCATION" & "TEST".
Thanks for any help!!!
Tom
input in the TABLE FORM VIEW. The data validation in e.g.
field Y should be based on data in field X.
I rather not want to use the "data default" values since I
have too many data options that would drive the acceptable
value in the dependent field.
Instead, I'd like to use a module (please see sample
below) in which I can put all the data dependencies.
So, my questions are:
1. If possible, how do I link a module to a table?
2. If yes, what should be the table properties?
3. Did I write the module code properly in order to
create/validate in the table?
*************** MODULE *************
Public Function DataDependencies(LOCATION As Variant, TEST
As Variant) As Variant
If LOCATION = "ACO" Then
TEST = "testing ACO"
End If
If LOCATION = "ACT" or LOCATION "FP" Then
TEST = "testing ACT"
End If
If LOCATION = "NSO" Then
TEST = "testing NSO"
End If
End Function
**************
So, here I'd like to create a dependency between
field "LOCATION" & "TEST".
Thanks for any help!!!
Tom