Help?!

crispbreeze19

Registered User.
Local time
Today, 01:45
Joined
Feb 7, 2005
Messages
10
I have a 2 tables and 4 fields that I want to work with.
where it is
Table A with Field1, Field2 and Field3
Table B with Field4

I want Field1 to be equal to the number of 1s plus the number 7s. Here is the doosy! but I only want to count the 1s and 7s in Field4 between the record number Field2 and Field3.

Any help you could offer would be great! I know a little about MSAccess VBA and macros.
 
You will have to explain more. What are being stored in your Fields, just numbers? It sounds like Field4 has many 1s and 7s and you want a total count of 1s + 7s in Field4 to be stored in Field1. Where do the Field2 and 3 come in?
 
The fields are only numbers but I want to count the 1s and 7s between record # blah blah and blah blah with blah blah being set to field3 and field4 respectively.

Example

Table1

Field1 Field2 Field3
2 4

Table 2

Field4
the first column is the record number not data in the field
r1 1
2 3
3 1
4 7

5 1
6 7
7 5

So field1 would be equal to 2 because only the bolded records are being calculated.
 
Nope, sorry. You've still got me in the dark here. I have no idea what you are asking? Try and explain what you are calculating and what result you wish to see. Is this calculation to be run as a function, query or form?
Because I can't tell if you are trying to calculate or count the data. Data types would also hel.
 
i have attached a sample database. Now I want another field in the query to count the number of 1s and 7s in the field noweekend between specific row numbers. The first and last row numbers are defined by the expr1 field and "expr1 + turnaround time" fields

Example
turnaround time equals 4
Expr1 equals 5

It will count the number of 1s and 7s between row 5 and 9 on the noweekend field.
Therefore the field will be equal to 2
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 1
9 2

10 3
11 4
12 5


I hope I have cleared up things that I have halfazzardly tried to explain. Bear with me :) Thanks in advance for taking a look.
 

Attachments

Users who are viewing this thread

Back
Top Bottom