T
Tom
I am performing data validation on a table. More
specifically, I need to validate dependencies between
certain fields.
For instance, I might have a table that contains the
following fields/records:
ID MILCIV STATUS RANK
== ====== ====== ====
1 Military Officer SK1
2 Military Enlisted BM2
3 Civilian A-Level A5
4 Military Enlisted OF3
5 Civilian B-Level A5
Based on the sample data, the dependencies for the
following records are violated:
ID 1:
STATUS = Officer, but RANK is equivalent to Enlisted
ID 4:
STATUS = Enlisted, but RANK is equivalent to Officer
ID 5:
STATUS = B-Level, but RANK is equivalent to A-Level Civ.
I have developed queries that show all 3 records with the
incorrect data.... so, identifying the records is not the
problem.
I also have placed the queries into a module and execute
them one after another via a command button.
HERE'S THE PROBLEM NOW!
Executing all queries and reviewing them one after
another (and closing 20+ open query windows) does not
seem very efficient.
Besides, most of the time, I don't have an error in the
table so I'm going through this exercise "just to make
sure"...
Setting up criteria in the table which will allow to
enter only certain values in a field based on other
values in another field will not work either since I have
too many possibilities (hundreds of military ranks, etc.).
My goal would be to still execute all queries via the
command button on a form, but ONLY SHOW THOSE WHERE THERE
IS TRULY AN ERROR (instead of opening all queries).
Is that possible???
Thanks! Any help is appreciated!!!
Tom
specifically, I need to validate dependencies between
certain fields.
For instance, I might have a table that contains the
following fields/records:
ID MILCIV STATUS RANK
== ====== ====== ====
1 Military Officer SK1
2 Military Enlisted BM2
3 Civilian A-Level A5
4 Military Enlisted OF3
5 Civilian B-Level A5
Based on the sample data, the dependencies for the
following records are violated:
ID 1:
STATUS = Officer, but RANK is equivalent to Enlisted
ID 4:
STATUS = Enlisted, but RANK is equivalent to Officer
ID 5:
STATUS = B-Level, but RANK is equivalent to A-Level Civ.
I have developed queries that show all 3 records with the
incorrect data.... so, identifying the records is not the
problem.
I also have placed the queries into a module and execute
them one after another via a command button.
HERE'S THE PROBLEM NOW!
Executing all queries and reviewing them one after
another (and closing 20+ open query windows) does not
seem very efficient.
Besides, most of the time, I don't have an error in the
table so I'm going through this exercise "just to make
sure"...
Setting up criteria in the table which will allow to
enter only certain values in a field based on other
values in another field will not work either since I have
too many possibilities (hundreds of military ranks, etc.).
My goal would be to still execute all queries via the
command button on a form, but ONLY SHOW THOSE WHERE THERE
IS TRULY AN ERROR (instead of opening all queries).
Is that possible???
Thanks! Any help is appreciated!!!
Tom