Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

add item select statement

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Add item to a select statement

Add item to a select statement

ResolvedVersion 2007

Tracey has attended:
Excel VBA Intro Intermediate course

Add item to a select statement

I have inherited some code and added an item to every instance of a select statement that I can see. I'm getting an error that the two sides of a union query aren't equal (there's a union all around the select statements), but can't see what I'm missing.

RE: Add item to a select statement

Hi Tracey

Thanks for the question.

A union query in Jet SQL will only work if the two tables in the union query have the same fields with identical names. That error suggests that you are trying to unite two tables that have different fields.
So as a first check, I'd look to see if that is the case. If so, then you will need to address this. If this is not the case then please get back to me and I can explore further options

Regards

Stephen

Thu 10 Mar 2011: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Creating custom lists

In Excel if you type in January in a cell, you can then copy this cell to replicate Febraury, MArch, April etc.

This list has come from Tools- options and Custom lists.

Therefore to save time and create your own list you can click on New (in Tools and custom list tab) and type out the lsit that you want copied quickly.

All you have to do is then type in the 1st word and you will be able to copy the rest of the list quickly.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.