Please help with extracting records

A

Al

I have a table with the following values:

PatID TestDate Type Value Range Na_Yes_No
2163 7/10/1995 NA+ 143 145 0
2163 10/2/1995 NA+ 147 145 1
2163 11/27/1995 NA+ 140 145 0
2163 7/1/1996 NA+ 144 145 0
2163 7/10/1996 NA+ 146 148 0
2163 7/18/1996 NA+ 151 145 1
2163 7/26/1996 NA+ 146 145 1
2163 8/5/1996 NA+ 144 145 0
2163 8/22/1996 NA+ 146 145 1
2163 9/9/1996 NA+ 150 147 1
2163 9/16/1996 NA+ 145 145 0
2163 10/1/1996 NA+ 147 145 1
2163 10/17/1996 NA+ 142 145 0
2163 2/18/1997 NA+ 141 145 0
2163 3/3/1997 NA+ 149 145 1
2163 3/11/1997 NA+ 146 145 1
2163 3/17/1997 NA+ 143 145 0
2163 3/26/1997 NA+ 149 145 1
2163 3/31/1997 NA+ 143 145 0
2163 4/14/1997 NA+ 145 145 0
2163 5/1/1997 NA+ 148 145 1
2163 5/8/1997 NA+ 146 145 1
2163 5/19/1997 NA+ 150 145 1
2163 5/21/1997 NA+ 142 145 0

I am interested in extracting the records that has 1 in the ("Na_Yes_No"
field) with the following scenario:
(0 1 1 0) or (0 1 1 1 0), I do not care about records that has 1 in the
following Scenario: (0 1 0). the "1" must be repeated at least 2 times to be
of interest to me.

in the above example there should be 9 records that I am interested in
(flagging/extracting). these 9 records are for the following dates:
7/18/1996
7/26/1996
8/22/1996
9/9/1996
3/3/1997
3/11/1997
5/1/1997
5/8/1997
5/19/1997
any idea how?
thanks
Al
 
E

Eric D via AccessMonster.com

I would say you need to write VBA to do this.
You would have to read each record, check for Na_Yes_No, then read next
record. If you find Na_Yes_No to be set in two or more records, you would
have to copy said records into an array. At the end, you should have what you
are looking for.

Are you looking for someone to write the code for you or are you simply
looking for suggestions?
 
A

Al

I need help on the code. thanks
Al

Eric D via AccessMonster.com said:
I would say you need to write VBA to do this.
You would have to read each record, check for Na_Yes_No, then read next
record. If you find Na_Yes_No to be set in two or more records, you would
have to copy said records into an array. At the end, you should have what you
are looking for.

Are you looking for someone to write the code for you or are you simply
looking for suggestions?
 

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