Solved

Union Query and Mail Merge sorting problem

Posted on 2006-06-17
3
220 Views
Last Modified: 2006-11-18
I work with test procedures, inspection reports and work items.  The work items are of 2 different work types i.e. Type A and Type B

I have a union query that ties 3 different queries.

The test procedure is enter into selector form's text box and the command buttton opens the union query.

The union query gathers Type A (Query #1) and Type B (Query #2) work items assigned to the test procedure.  The third Query adds  a STATEMENT  that tells the inspector that all of Type A and B work types have been gatther and the report is ready for them to add their hand written decrepancies  to the report.  

Everything is working fine, but when press the "Publish It In Word" command button to get ready for the mail merge.  The STATEMENT does not always appear at the bottom of the Word table.

How do I fix the queries in order for the STATEMENT always appears at the bottom of the Word table?  .
0
Comment
Question by:MG_Janiszewski
3 Comments
 
LVL 46

Accepted Solution

by:
tbsgadi earned 20 total points
ID: 16928678
Can you post your queries Please

Gary
0
 
LVL 26

Assisted Solution

by:dannywareham
dannywareham earned 480 total points
ID: 16929026
This may not be an issue with the queries (although it probably is :-p  )

Exporting reports to Word (especially heavily formatted reports) doesn't always work well.
I find that rectangles and tables are most prone to alter in the export.
Try exporting as a snapshot and see if it retains the data in the correct places.

If you can post your queries (as gary suggests), and we'll have a look at those too.

Finally, if you are using subreports (for example, you have customer data on the main report and products on the subreport, as is normal) then Word does not support this.
Instead, you need to get every field for your merge into a single source record. then you can pass teh data to fields in the Word doc directly.

Alternatively, you have to use automation to loop through your records and pass seperate record data across to Word (and this is not easy)  :-)

Danny
0
 

Author Comment

by:MG_Janiszewski
ID: 16938888
Sorry, I paniced before I did more testing and really looking at my query results.  They were in alphabetical order.  The Type A work items all started with a "R" and the Type B work items all started with a "T" and the STATEMENT started with a "E" causing it to be at the top of any query.

So my solution was to start the the STATEMENT with a "z" which it drove the STATEMENT to the bottom of the query.  
After doing the mail merge I corrected the misspelling.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now