Module linked to table

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
 
T

Tim Ferguson

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.

Sorry: this is exactly what forms are for. Datasheets won't cut it.

But, if there is this amount of dependency between attributes, then you may
still have some table design to do...

HTH


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top