C
Capronzz
FWIW - The classification of data is a pretty basic function on data
processing. Normally one has a table that specifies the range (argument) for
any given clasification: Thus
0 to 5 = A
6 15 = B
16 35 = C
36 38 = D and so forth.
Access file relationships are only partially implemented in that only
records having an EXACT (=) match are enabled to establish a relationship.
Having a transaction file of several thousand records and a classification
file of just under 70 and wishing to relate and classify (and recalssify) the
transactions I proceded as follows:
For the Classification file:
Sort by upper limit of the range
Serial number each record
Set up a one record "count" file
Set up one record 'Classification being worked on' file.
Query to 'pull' the first Clasification record.
For the Transaction file:
Query to process only those records not yet classified
Procedure:
Establish file relationships as if the exact match condition were to be
used.
- Open the code and change the match '='
to '<'.
Query to 'find' Transaction records less than the upper limit and then
Update Query to classify those records
Increment the 'count' by 1
Query to pull the next Classification record into place.
Use Macro to 'loop' through the procedure. Note that records classified
will now not be processed leaving higher values than the prior Classification
record.
Housekeeping and other considerations:
The upper limit of the range will want to be the start of the next
classification
Allow no 'gaps' in the Classification file
Since Access will disallow looping more that 25 times you will have to
Run the procedure multiple times or find a way around the limitation.
When setting up the macros it helps to sprinkle the Transaction file
with some 'exact' matches and run that way until you have everything working.
Then change the '=' to '<'. Thereafter you will not be able to access the
file relationships screen.
When the Classification file is changed you must resort and sequence
number it.
Set up a 'Query to remove the classifications to aid in debugging and
reclassification.
In essence what I have done is simply implemented the old 'flat file'
methodology of punched card days.
There are some messy aspects to the above and I have not cleaned
them up. Couldn't get 'Next Record' working so I used the counter method.
Still -- I have my data classified and can reclassify when needed. Serial
numbering of Classification file I do manualy at this point - which is sort
of bad.
I have to laugh though - when I started in the business in 1952
classificaiton of data was as simple as sorting the two files and loading up
the Collating Reproducing Machine. and pushing the start button.
processing. Normally one has a table that specifies the range (argument) for
any given clasification: Thus
0 to 5 = A
6 15 = B
16 35 = C
36 38 = D and so forth.
Access file relationships are only partially implemented in that only
records having an EXACT (=) match are enabled to establish a relationship.
Having a transaction file of several thousand records and a classification
file of just under 70 and wishing to relate and classify (and recalssify) the
transactions I proceded as follows:
For the Classification file:
Sort by upper limit of the range
Serial number each record
Set up a one record "count" file
Set up one record 'Classification being worked on' file.
Query to 'pull' the first Clasification record.
For the Transaction file:
Query to process only those records not yet classified
Procedure:
Establish file relationships as if the exact match condition were to be
used.
- Open the code and change the match '='
to '<'.
Query to 'find' Transaction records less than the upper limit and then
Update Query to classify those records
Increment the 'count' by 1
Query to pull the next Classification record into place.
Use Macro to 'loop' through the procedure. Note that records classified
will now not be processed leaving higher values than the prior Classification
record.
Housekeeping and other considerations:
The upper limit of the range will want to be the start of the next
classification
Allow no 'gaps' in the Classification file
Since Access will disallow looping more that 25 times you will have to
Run the procedure multiple times or find a way around the limitation.
When setting up the macros it helps to sprinkle the Transaction file
with some 'exact' matches and run that way until you have everything working.
Then change the '=' to '<'. Thereafter you will not be able to access the
file relationships screen.
When the Classification file is changed you must resort and sequence
number it.
Set up a 'Query to remove the classifications to aid in debugging and
reclassification.
In essence what I have done is simply implemented the old 'flat file'
methodology of punched card days.
There are some messy aspects to the above and I have not cleaned
them up. Couldn't get 'Next Record' working so I used the counter method.
Still -- I have my data classified and can reclassify when needed. Serial
numbering of Classification file I do manualy at this point - which is sort
of bad.
I have to laugh though - when I started in the business in 1952
classificaiton of data was as simple as sorting the two files and loading up
the Collating Reproducing Machine. and pushing the start button.