I’m using MS Access 2000, SR-1.
The Data I have to use is in a linked, SQL7 database that I can only read from.
In my Access Database, I've created a query that pulls the following data from the SQL Database:
Query [Forcast_1] contains four fields.
[Jobnum]
[Planum]
[Interval]
[Counter]
Example:
Jobnum
1142
1142
1142
Planum
M-12
M-24
M-48
Interval
1
2
4
Counter
22
22
22
Problem:
To determine which Planum will be the correct one, I have to select the Planum with the HIGHEST Interval number that divides evenly, (no fractions), into the value in the Counter field. If no Interval number fits this criterion, I have to use whichever Planum has Interval number 1.
So far, I’ve only used Macros converted into VBA. I have two weeks to come up with something that will cycle through all of the [Jobnum] and calculate which of the [Planum] is the one to use for each of several hundred [Jobnum].
After I get the right [Planum] for each [Jobnum], there are a lot of Date related forcasting results I have to do also and I think I know how to do them, but first I have to get over this seemingly impossible calculation.
Can anyone please give me some advice at a VBA beginner level that will help me do this?
I’ve got so much to learn, sometimes I don’t understand how you guys all figured this stuff out!
TIA
M
The Data I have to use is in a linked, SQL7 database that I can only read from.
In my Access Database, I've created a query that pulls the following data from the SQL Database:
Query [Forcast_1] contains four fields.
[Jobnum]
[Planum]
[Interval]
[Counter]
Example:
Jobnum
1142
1142
1142
Planum
M-12
M-24
M-48
Interval
1
2
4
Counter
22
22
22
Problem:
To determine which Planum will be the correct one, I have to select the Planum with the HIGHEST Interval number that divides evenly, (no fractions), into the value in the Counter field. If no Interval number fits this criterion, I have to use whichever Planum has Interval number 1.
So far, I’ve only used Macros converted into VBA. I have two weeks to come up with something that will cycle through all of the [Jobnum] and calculate which of the [Planum] is the one to use for each of several hundred [Jobnum].
After I get the right [Planum] for each [Jobnum], there are a lot of Date related forcasting results I have to do also and I think I know how to do them, but first I have to get over this seemingly impossible calculation.
Can anyone please give me some advice at a VBA beginner level that will help me do this?
I’ve got so much to learn, sometimes I don’t understand how you guys all figured this stuff out!
TIA
M
Last edited: