Question:
Anybody out there real good with MS Access Queries??? Please read my details...?
2006-06-03 10:31:49 UTC
I have an Access table with about 3,000 records with various fields containing specific values. Suppose one of the fields contains consecutive numbers (a primary key one for each record). Now, filters get set that allow for records to be displayed where certain fields contain certain values (such as "currentprice = 17.00") and suppose about 300 of all the records meet this criteria. QUESTION: IS THERE ANY WAY TO USE THE VALUES IN THE DESCRIBED PRIMARY KEY TO DETERMINE HOW MANY RECORDS ARE BETWEEN EACH OCCURRANCE WHERE THE 'CURRENTPRICE' MEETS ITS CRITERIA???

MS Access help files and online resources are TOTALLY USELESS when searching for answers about this!!!!

(go ahead and tell me I have to learn how to write modules if that's the only way it can be done...)

Sorry for any mispelled words, there is no spall chack for these details!!!
Three answers:
Walt C
2006-06-03 10:36:42 UTC
You can have a priority query where you designate one category to be arranged on way then a second category to be arranged a certain way with out affecting the first category. I hope I understood your question because I do know how confusing Access can be.
ssans
2006-06-03 10:48:28 UTC
I hope ur problem is to count number of rows matching the criteria, as u say currentprice=



This may solve ur problem.



I name ur table for purpose of explaining as 'Products' and Primary key as 'id'



Create a new query in access and click design. on its title bar click and change to SQL Query( U can use other ways to open SQL Query any way refer to access docs if u find this wrong)



type SQL Query



SELECT Count(id) FROM Products WHERE CurrentPrice=50
yars232c
2006-06-03 10:43:20 UTC
You can create a counter control, like me![counter]. You can also create a break with sorting/grouping and count the number of detail lines in the section.



Sometimes we can overthink with Access. It's fourth generation, but don't let that fool you.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...