?
Solved

Union Query and Mail Merge sorting problem

Posted on 2006-06-17
3
Medium Priority
?
268 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:Michael Janiszewski
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 46

Accepted Solution

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

Gary
0
 
LVL 26

Assisted Solution

by:dannywareham
dannywareham earned 1920 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:Michael 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

762 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