<%dim crumb crumb="Advanced Union Query Download" Crumb2="Union Query Advance Query Example" crumb1="Union Query Access Download Example" %> Advanced Union Query Download
Home  Fees/Services  Access 2010 Template  Access Tutorial  Access Download  Articles  Search  Contact  Privacy  Links

<%if len(crumb2)>2 then response.write crumb2 else response.write ">

Open Email Using SendObject Access Download

User Inactivity Logout VBA Code

Disable Shift Key Demo

Send Email Microsoft Access Tutorial Download (Advanced)

Sequential Counter in Query

Multi Select List Box Query Parameters

Row Level Data Security

Programming MS Access Security Alternative

Single User Inventory Calculations Download

How To Perform Multi-User Inventory Calculations

Make Dependent Combo Box Code MS Access Tutorial

Union Query Example (Simple)

Union Query (Advanced) Access Tutorial

How To Fill Fields From Combo Box

Use Global Variables as Parameters

Continuous Form Dependent Combo Box

How To Program Continuous-Continuous Master/Detail Forms

Access Bar Chart / Bar Graph

Programming Crosstab Query Example

TransferText & OutputTo Microsoft Access

DoCmd.OpenForm & OpenArgs VBA Example

Running Sum Query Method

Choose Command Dynamic SQL Order By

Access Conditional Format

Access Report Banding

Popup Form Control Method

<% gnum="9143960073" %>

Advanced Union Query Download

This advanced union query example shows some interesting and advanced concepts.  Usually in a union query you are selecting the same or similar data from different tables. In this example we selecting the individual data records from the table and at the same time using the union query function to select aggregate functions from the same table.  In this case we are selecting the average, minimum and maximum revenue values grouped by Department.

This aggregate function technique, including countless variations, can be very use when exporting data to other programs such as Excel.  Or perhaps you want to send the revenue data to a website for display.  Using this advanced union query technique allows you to avoid performing these aggregate function calculations either on the website, in a spreadsheet or in an Access report.  Note that if you using Access reports  you'll need to create a Group on the Department field.  In some cases grouping can conflict in a report and can make the report difficult to program when there are many summary levels. Here are the results of the union query example:

Union Query Example

To examine the union query download our Microsoft Access Union Query Database.

Microsoft Office:
MS Access 2003
Access 2007
Access 2010
Access 2013
Access 2016
<% dim rnum Randomize rnum = Int(Rnd * 10) + 1 response.write " Updated On " & now-rnum %>

Contact Information

<% Response.write "Copyright 2000-" & year(now) & " Blue Claw Database Design" %>

MS Access 2013, Access 2010 & Microsoft Office 2007