473,480 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

criteria filter by an extra field

Hi All

Access newbie - normally do my data work in excel. One of the DBAs gave me this query but he isn't available this week:

SELECT GroupHometoUnisys_Min.F2, Min(GroupHometoUnisys_Min.[Min Of DISTANCE]) AS [MinOfMin Of DISTANCE]
FROM GroupHometoUnisys_Min
GROUP BY GroupHometoUnisys_Min.F2;

Its trying to report on the minimum distances between service sites and the service points so we can cost vendors.

F2 has the site name e.g. GH-Alma St
MinOfMin Of DISTANCE is a typo - this field pulls out all the records that have the minum distance (because there are duplicate records)

What I want to do is just add the field "Service_Po" so that the report has the vendor service points as well. But when I do I get all the duplicate records coming back.

So it's knocking out the filtering that the min distance criteria did. Any ideas how to keep that but add this field? I've tried a 'where' but I didn't know the syntax.
Nov 1 '10 #1
1 1708
jimatqsi
1,271 Recognized Expert Top Contributor
Change
Expand|Select|Wrap|Line Numbers
  1. GROUP BY GroupHometoUnisys_Min.F2
to
Expand|Select|Wrap|Line Numbers
  1. GROUP BY GroupHometoUnisys_Min.F2, Min(GroupHometoUnisys_Min.[Min Of DISTANCE])
Jim
Nov 1 '10 #2

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

Similar topics

1
2102
by: Sue | last post by:
What do I put as criteria in a date field to return all records where the date field is blank? Thanks for all help!! Sue
2
2446
by: ChasW | last post by:
I just read these 2 pages. These are most helpful, but leave me with a question. http://www.mvps.org/access/queries/qry0005.htm http://www.mvps.org/access/forms/frm0007.htm I have a Multi...
1
1802
by: savvy | last post by:
I am developing a Garments shopping cart. On the single product page where the customer selects size and colour of a garment and if its ok for him, then adds to his basket, so every time he checks...
6
3427
by: pobnospam | last post by:
I have a field called ingredients where multiple ingredients can be contained in one record (client request). Now when a report is run I need to prompt a user to determine which records to display...
1
1146
by: Piotrek \Alchemik\ | last post by:
Hello, i'm trying to create dropdownlist which will include not only fields from database binding, but would have an extra one or two fields, which could let me choose something different, i.e....
16
16602
by: tiarynn | last post by:
Hi everyone, I am a beginning to intermediate user with Access 2000 on XP. I am trying to create a query from a table of more than 1300 records. I need to look up individuals by their SSN only...
2
2546
by: dympna | last post by:
Hi can anyone suggest a fix for this... as I am a novice in access. I have created a training table with the following fields Employee Name - joe Training Received - Fork lift Date Received...
3
1470
by: jaishu | last post by:
Hi, I have a form where user enters an ID in a text box, the ID is actually 10 digits, but even if the user enters 5-6 digits , my code is supposed to pick tht and based on tthis it should...
8
3305
by: John Torres | last post by:
I have created a report base on a query. And on Query or report I want to remove all entry with “Set-Up Charge” under Comment field (Memo). I tried < >”Set-Up Charge” but it shows all the...
1
3323
by: accessbeginerry | last post by:
Hello, i am starting to give up :( search the forum and tried to correct my mistakes - but no luck. Does anyone have a clue what i am doing wrong? I have a form and subform. I have a button...
0
7033
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7071
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...
1
6726
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6861
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...
1
4763
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4468
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
2987
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
2974
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1291
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 ...

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.