Count *

Crocdundee

Board Regular
Joined
May 10, 2010
Messages
174
Office Version
  1. 2013
Platform
  1. Windows
Can someone please help me here,Counting total records

I am trying to put a count in textbox5 on a form from this sql code.

SELECT SELECTIONS.Track, SELECTIONS.RNO, SELECTIONS.TAB, SELECTIONS.HORSE, SELECTIONS.Jockey, SELECTIONS.Odds, SELECTIONS.RATING, Ozeform.WNO, Ozeform.[_2ND], Ozeform.[_3RD], Ozeform.NSW_W, Ozeform.NSW_P, Ozeform.NSW2, Ozeform.NSW3
FROM SELECTIONS INNER JOIN Ozeform ON (SELECTIONS.Track = Ozeform.TRACK) AND (SELECTIONS.RNO = Ozeform.RNO)
WHERE (((SELECTIONS.TAB)=[wno]) AND ((Ozeform.RDATE)=[Forms]![Form1]![Combo25])) OR (((SELECTIONS.TAB)=[_2nd])) OR (((SELECTIONS.TAB)=[_3rd]))
ORDER BY SELECTIONS.RcTime;
Appreciate any help here
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
What exactly is this SQL suppose to represent?

Have you looked at the DCount function?
 
Upvote 0
ok, thanks for the reply.
First of all I can count records by Count(*) off the first query
However I have changed my mind by creating a summary form
I will do the summaries in the footer of the report
I will try dcount also

Will be back

Graham
Thanks
 
Upvote 0
Ok JackD, Thanks for your interest, and I have been trying hard to get this, and I have.
In a report footer i have textboxes to fill the summaries.
First I count all records (filtered by a date)
Count(*)
then i use a sum for the next TBox
=(Int(Sum(IIf([TAB]=[WNO],1,0))))
etc etc and it works
Thanks
Graham
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,292
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top