add item select statement

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

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

resolvedResolved · Medium Priority · Version 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:

Using Alt in Save Dialog Box

When you are saving (or opening) a file, try these;
(Note the numbers are on the keyboard not the numeric keypad)
1. Go to previous folder Alt+1
2. Go up one folder level Alt+2
3. Search the Web Alt+3
4. Delete selected file Alt+4 or Delete
5. Create a new folder Alt+5
6. Cycle through all views Alt+6 repeatedly
7. Display the Tools menu Alt+7

View all Excel hints and tips


Server loaded in 0.07 secs.