I am importing data from a CSV file into an MS Database.
The file containing the data has around 20 fields, and each field has a range of possible values. These values are known.
I would like to be able to check, on import, whether the data in a field contains one of the legitimate field values (or not). What would be the best (i.e. simplest/most elegant/robust) way of doing this?
I am currently thinking that a "Select Case" method for each field may be the way to go, but I have a feeling a better solution may exist.
For example, for the first field, check to see if the value is valid using Select Case:
The file containing the data has around 20 fields, and each field has a range of possible values. These values are known.
I would like to be able to check, on import, whether the data in a field contains one of the legitimate field values (or not). What would be the best (i.e. simplest/most elegant/robust) way of doing this?
I am currently thinking that a "Select Case" method for each field may be the way to go, but I have a feeling a better solution may exist.
For example, for the first field, check to see if the value is valid using Select Case:
Code:
Select Case dataFldOne
Case "ACES"
result = TRUE
Case "FIX"
result = TRUE
Case "PHN"
result = TRUE
Case "SDOT"
result = TRUE
Case Else
result = FALSE
End Select
Comment