access forms
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » Access 2007 Forms

Access 2007 Forms

resolvedResolved · Low Priority · Version 2007

replyReply Tue 24 Mar 2009, 17:20Delegate Barry said...

Barry has attended:
Access Intermediate course
Access Advanced course
Access VBA course

Access 2007 Forms

What is a union query for?

For upcoming training course dates see: Pricing & availability

replyReply Mon 30 Mar 2009, 12:08 Edited on Mon 30 Mar 2009, 12:09Trainer Carlos said...

RE: Access 2007 Forms

Hi Barry

The UNION query allows you to combine the result sets of 2 or more "Select" queries. It removes duplicate rows between the various "Select" statements. To create a UNION quey you have to write the SQL String manually on the SQL Window. You cannot use the design view.

Each SQL statement within the UNION query must have the same number of fields in the result sets with similar data types.

The syntax for a UNION query is:

Select field1, field2, . field_n
From tables
UNION
Select field1, field2, . field_n
From tables;

For Example:

Select Customer_Id
From Customers
UNION
Select Customer_id
From Orders;


In this example, if a Customer_Id appeared in both the Customers and Orders table, it would appear once in your result set.

The UNION query removes duplicates.

Hope this helps

Carlos

Thu 9 Apr 2009: Automatically marked as resolved.

 

Please browse our web site to find out more about
access database courses and other Microsoft training courses.

Access tip:

Switchboard Startup

An option when you open your Access database that contains all of you tables, forms and queries is only the switchboard is displayed.

To achieve this, select Tools click on Startup. On the right hand side of the Startup screen you are able to select which form you want to open when you open you Access Database. Once you have selected this, there is a check box just below that says "Display Database Window", you need to uncheck this option. Then click ok.

Then when you close you Access database and re open it, the database should open with just the switchboard being shown


View all Access hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard