How to count record

N

Nova

I have 2 table and fields as below

Table A has 2 fileds Table B has 1 field
val1 val2 valRef

All 3 fields is integer data

How can I create query to count all record of table B where valRef between
val1 an d val2.
 
N

Nova

Dear Tom Ellison:

My file is Access 2003 WindowsXP, Thanks for let me know abot "alasing".
In my file, I want to count or sum or others arithmatic function by look data
from some reference tables such as Table B in my question.

For example In form AA contains of
control text1, text2 and button "count"
for event button "count" click() I want function to get value from text1 then
compare with data (valRef field) in Table B accordings to condition such as
count number of record in Table B where text1<valref then show results in
text2.

Assume ValRef filed has 5 records

11
12
13
14
15

if value in text1 in form "AA" is 5, when click buuton "count" then text2 = 5
if value in text1 in form "AA" is 16, when click buuton "count" then text2 = 0
if value in text1 in form "AA" is 13, when click buuton "count" then text2 = 2

I it poosible to create function for this?

Thanks
 
T

Tom Ellison

Dear Nova:

Your explanation of the problem is not getting through to me. Perhaps a
more complete example would help.

Would you try that, please.

Tom Ellison
Microsoft Access MVP
 
Top