473,508 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Count Minimum and Maximum values in a report

99 New Member
I have a query in MS Access that gets data from other queries. It generates a field that contains numeric data and, if no number, a string: "Abs". When designing report based on this query, the Min() function gives the minimum number of the field whereas Max() function returns the string "Abs". But I want the Min and Max values from only the numbers. Any help will be appreciated.
Thanks
Nov 17 '14 #1
3 3433
jforbes
1,107 Recognized Expert Top Contributor
It sounds like the column you are attempting to get the Max() out of isn't numeric. You'll want to set it to numeric, if you can, or if this query starts taking a long time to return results. So, if you want to leave the Table the way it is, you can try:
Expand|Select|Wrap|Line Numbers
  1. Max(Val([YourFieldName]))
This will cause a conversion to a numeric value on the field. This will convert text to a zero and if the field is alphanumeric, it will grab the number, if it is before any text, and use it. ex:
Expand|Select|Wrap|Line Numbers
  1. "2" -> 2
  2. "2f2ff2f22f" -> 2
  3. "ff2ff2f2ff2" -> 0
Nov 17 '14 #2
twinnyfo
3,653 Recognized Expert Moderator Specialist
You could also add criteria to your query:

Expand|Select|Wrap|Line Numbers
  1. WHERE [FieldName] <> "Abs"
Nov 19 '14 #3
mshakeelattari
99 New Member
jforbes and twinnyfo, Thak You
Nov 20 '14 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
7793
by: SJM | last post by:
I have a report that displays records of real estate properties. It is possible for each property to appear a number of times for various reasons. Each record however is unique. What I would like...
17
1933
by: gk245 | last post by:
For instance, if i had a array like this: array = {1, 2, 3, 5, 6, ......}; How do i tell C go get me the number of values in the array? Not the value itself, but how MANY of them there are. ...
4
3576
by: Scott | last post by:
In order to give a meaning average value and minimum and maximum values, I would like to have a formula for a group of data after taking out those extremes. Can someone share your way to...
1
3497
newnewbie
by: newnewbie | last post by:
Desperately need help in creating a query to count unique values in a table. I am a Business analyst with limited knowledge of Access….My boss got me ODBC connection to the underlying tables for our...
3
9028
by: Frank Rizzo | last post by:
I am trying to do some monitoring of some PerfMon counters and have a question. Does PerfMon figure out the Minimum, Maximum, Average values for each counter? Or are those values part of the...
5
10843
by: Soccer5 | last post by:
Trying to Count records on a report that meet a certain criteria. Have a text box in the Report Footer that has the following in the Control Source: =Count(="S") This does not work. It...
7
3596
by: junky_fellow | last post by:
Guys, Does the standard allow to an implementation to chose any maximum and minimum value for an object of type int ? For eg. Can an implementation with sizeof(int)=4, chose to have value of...
2
1762
by: dh87lfc | last post by:
Hi, I am currently working on a task which requires me to extract the top 10 maximum values from a column in a text file and print them to a new file. I am just wondering what would be the best way...
1
1657
by: gopim | last post by:
count no of values enter into the textbox through javascript that should be dispalyed in one label control.
3
2595
by: physes | last post by:
Dear all I have declared a function using ten variables. Each variable has both minimum and maximum values. Some of them has the same min/max value, so I should to this: I need to declare an if...
0
7328
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7499
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5631
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4709
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3199
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1561
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
767
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
422
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.