T
thrusty
I have two tables (Individuals and Census) - with a one to many
relationship...One individual may have many census codes.
Census codes define when an individual was (1)admitted, (2)off
grounds, (3)ongrounds or (4)discharged and has a date effective for
each code. For simplicity, I assigned each text-code a number.
What I would like to do is run a query that will pull out who was
either admitted or ongrounds given a date.
Here's what I'd like it to do:
Enter a date.
If the date entered is also when the code was a 1 or a 3, list that
person as being ongrounds.
For all others, go to the code that was entered prior to the given
date.
If that code is a 1 or a 3, then list that person as being
ongrounds for the given date.
Else, exclude all others, as the are not ongrounds on the given
date.
Any thoughts?
Thanks!
relationship...One individual may have many census codes.
Census codes define when an individual was (1)admitted, (2)off
grounds, (3)ongrounds or (4)discharged and has a date effective for
each code. For simplicity, I assigned each text-code a number.
What I would like to do is run a query that will pull out who was
either admitted or ongrounds given a date.
Here's what I'd like it to do:
Enter a date.
If the date entered is also when the code was a 1 or a 3, list that
person as being ongrounds.
For all others, go to the code that was entered prior to the given
date.
If that code is a 1 or a 3, then list that person as being
ongrounds for the given date.
Else, exclude all others, as the are not ongrounds on the given
date.
Any thoughts?
Thanks!