Hi Randal,
Here's a way without using VBA (code):
- Say the fields in your table "Table3" are
Field1 Field2 Field3 Field4 Field5 Field6
- Create following UNION Query
SELECT DMin("[field1]","[Table3]") AS Expr1, "FIELD1"
FROM Table3
GROUP BY DMin("[field1]","[Table3]")
UNION
SELECT DMin("[field2]","[Table3]") AS Expr1, "FIELD2"
FROM Table3
GROUP BY DMin("[field2]","[Table3]")
UNION
SELECT DMin("[field3]","[Table3]") AS Expr1, "FIELD3"
FROM Table3
GROUP BY DMin("[field3]","[Table3]")
UNION
SELECT DMin("[field4]","[Table3]") AS Expr1, "FIELD4"
FROM Table3
GROUP BY DMin("[field4]","[Table3]")
UNION
SELECT DMin("[field5]","[Table3]") AS Expr1, "FIELD5"
FROM Table3
GROUP BY DMin("[field5]","[Table3]")
UNION
SELECT DMin("[field6]","[Table3]") AS Expr1, "FIELD6"
FROM Table3
GROUP BY DMin("[field6]","[Table3]");
I hope this helps! If you have additional questions on this topic, please
respond back to this posting.
Regards,
Eric Butts
Microsoft Access Support
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<
http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <
http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."
--------------------
| From: "Randal" <
[email protected]>
| Subject: Earliest Date
| Date: Mon, 2 Feb 2004 10:31:28 -0500
| Lines: 5
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <
[email protected]>
| Newsgroups: microsoft.public.access.queries
| NNTP-Posting-Host: 12.28.226.67
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.
phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.access.queries:188408
| X-Tomcat-NG: microsoft.public.access.queries
|
| I have 6 fields in a table that contain dates. I need to pull the earliest
| date from all 6 fields into one field in a query. Is there a function in
| access to do this? thanks,
|
|
|