473,386 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Word 2003 mail merge using Access 2003 Query

I have Select Query in Access 2003, attached, that is run from a Word Mail merge and the data is put into the body of the email, example attached.

Upon selecting 2 records and clearing all the rest the sometime more than the 2records from the query get emailed, and we don't see this until after the wrong/extra records get sent.

Only thing I notice is that it seems to occur when someone else is using the DB to enter information but it's into an unrelated form/tables from the Selcet Query..

Has anyone else experienced this problem.

Is there a better, safer way to do this?
Attached Files
File Type: txt Select Query.txt (890 Bytes, 440 views)
File Type: txt Review Razor Wire Women for SUNY Press.txt (5.1 KB, 377 views)
Oct 9 '09 #1
7 3523
NeoPa
32,556 Expert Mod 16PB
I'll have a quick peruse to see if I can see anything, but I'll also post the attached SQL as it's a bit hard for people to help with a SQL problem when it's not posted visibly :S
Expand|Select|Wrap|Line Numbers
  1. SELECT Acquisitions_Manuscript.title,
  2.        Acquisitions_Manuscript.subtitle,
  3.        Acquisitions_Manuscript.authors,
  4.        Personal_Information.professional_title,
  5.        Personal_Information.last_name,
  6.        Personal_Information.full_name,
  7.        Reader_Report_Information.due_date,
  8.        Reader_Report_Information.honorarium_amount,
  9.        Reader_Report_Information.number_honorarium_books,
  10.        Reader_Report_Information.review_length,
  11.        Reader_Report_Information.notes,
  12.        Acquisitions_Manuscript.edited_volume,
  13.        Acquisitions_Manuscript.acquisitions_editor,
  14.        Staff.staff_title,
  15.        Personal_Information.email
  16.  
  17. FROM   Personal_Information INNER JOIN
  18.        ((Acquisitions_Manuscript INNER JOIN
  19.        Staff
  20.   ON   Acquisitions_Manuscript.acquisitions_editor=Staff.full_name) INNER JOIN
  21.        Reader_Report_Information
  22.   ON   Acquisitions_Manuscript.manuscript_id=Reader_Report_Information.manuscript_id)
  23.   ON   Personal_Information.personal_id=Reader_Report_Information.personal_id
Oct 9 '09 #2
NeoPa
32,556 Expert Mod 16PB
Expand|Select|Wrap|Line Numbers
  1. SELECT Acquisitions_Manuscript.title,
  2.        Acquisitions_Manuscript.subtitle,
  3.        Acquisitions_Manuscript.authors,
  4.        Personal_Information.professional_title,
  5.        Personal_Information.last_name,
  6.        Personal_Information.full_name,
  7.        Reader_Report_Information.due_date,
  8.        Reader_Report_Information.honorarium_amount,
  9.        Reader_Report_Information.number_honorarium_books,
  10.        Reader_Report_Information.review_length,
  11.        Reader_Report_Information.notes,
  12.        Acquisitions_Manuscript.edited_volume,
  13.        Acquisitions_Manuscript.acquisitions_editor,
  14.        Staff.staff_title,
  15.        Personal_Information.email
  16.  
  17. FROM   Personal_Information INNER JOIN
  18.        ((Acquisitions_Manuscript INNER JOIN
  19.        Staff
  20.   ON   Acquisitions_Manuscript.acquisitions_editor=Staff.full_name) INNER JOIN
  21.        Reader_Report_Information
  22.   ON   Acquisitions_Manuscript.manuscript_id=Reader_Report_Information.manuscript_id)
  23.   ON   Personal_Information.personal_id=Reader_Report_Information.personal_id


My first observation is that linking two tables on a FullName field is highly dubious. Any field which is not guaranteed unique (such as a unique index) makes it possible for multiple records to result from such linked SQL. I find it hard to believe a field such as Acquisitions_Manuscript.acquisitions_editor could be textual. If it's not a (probably numeric) unique reference then things are not well designed.

Nothing else springs to mind I'm afraid. Check that out though and see what you can make of it.
Oct 9 '09 #3
NeoPa
32,556 Expert Mod 16PB
This is not a technical comment, but in the text of your HTML document the word "alternate" is used in place of "alternative". It may be an idea to replace this as the two words have quite different meanings. I hope this was some help.
Oct 9 '09 #4
Thanks NeoPa.

The Acquisitions_Manuscript.acquisitions_editor in a lookup as follows...
Expand|Select|Wrap|Line Numbers
  1. SELECT [Staff: Active Acquisitions].full_name
  2. FROM [Staff: Active Acquisitions]
  3. ORDER BY [full_name];
It is textual, do you still think this is/might be the problem?
Oct 13 '09 #5
NeoPa
32,556 Expert Mod 16PB
I can't say I fully understand exactly what's going on from your description, but if that's not causing this problem (and it may well be) it's likely to cause you issues somewhere down the line. Certainly worth avoiding.

Are you aware that ComboBoxes can have multiple columns, any of which can be hidden, and any of which can be the value returned as the default .Value of the control. This means you can display the text value, yet have the code see the unique reference. This is the usual way to handle such things.
Oct 13 '09 #6
Yes, forgot about the ComboBox with multiple columns. Thanks again!

The real issue is reproducing & testing for the problem as it doesn't occur all the time and you don't know a wrong email is sent until it's too late. :-(
Oct 13 '09 #7
NeoPa
32,556 Expert Mod 16PB
I sympathise. The best help I can provide at this point though is simply to link you to Debugging in VBA.

Good luck :)
Oct 13 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Jerry Hull | last post by:
I'm working with a database developed by an untrained person over several years - and on a network that has recently been upgraded with a new server installed and MS office upgraded from 2K (I...
7
by: Andy Davis | last post by:
I have a table of data in Access 2002 which is used as the source table for a mail merge document using Word 2002 on my clients PC. The data is transferred OK but I've noticed that any dates which...
4
by: pmhaupt2 | last post by:
I developed an Access 2003 program that will allow the user to produce a group of Word letters that merge with data records from an Access database. I created a mail merge Word document and...
10
by: John | last post by:
Hi I am trying to do a word mailmerge form within my vb.net app. My problem is how to do a query on one of my tables and use the result as the mail merge datasource. Any help would be...
2
by: Colin Halliday | last post by:
I have a Word 2003 mail merge main document (form letter) that is linked to another Word document data source for the mail merge. If I open this doc using the Word GUI, it first asks me to...
0
by: Darragh | last post by:
I'm encountering some serious problems trying to set Access 2000 querys (parameters and views) as data sources for my mail merge documents (Word 2003). After spending hours scouring the web for...
5
by: darnnews | last post by:
Hi, I have been creating a database to keep track of press clippings, but I have hit a couple stumbling blocks. Any help is much appreciate. 1) Seeing if my query is done I have the...
8
by: Ron B | last post by:
Help!!! What am I doing wrong? I am working with Office 2003 and am trying to create a command button on an Access form that will create a mail merge in Word from an Access table. I want to...
2
by: veaux | last post by:
I have single integers representing a month (i.e. 2) and need to convert this to (March 1, 2007). So "2" represents really the end of the previous month. I'm using MonthName and adding 1 in my...
1
by: kayberrie | last post by:
I want to write a VBA mail merge code. I want to link the code/macro/dohicky to a nifty little button so it makes life easy. I think I can handle the button part, the code part - not so much. I know...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.