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?
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 - SELECT Acquisitions_Manuscript.title,
-
Acquisitions_Manuscript.subtitle,
-
Acquisitions_Manuscript.authors,
-
Personal_Information.professional_title,
-
Personal_Information.last_name,
-
Personal_Information.full_name,
-
Reader_Report_Information.due_date,
-
Reader_Report_Information.honorarium_amount,
-
Reader_Report_Information.number_honorarium_books,
-
Reader_Report_Information.review_length,
-
Reader_Report_Information.notes,
-
Acquisitions_Manuscript.edited_volume,
-
Acquisitions_Manuscript.acquisitions_editor,
-
Staff.staff_title,
-
Personal_Information.email
-
-
FROM Personal_Information INNER JOIN
-
((Acquisitions_Manuscript INNER JOIN
-
Staff
-
ON Acquisitions_Manuscript.acquisitions_editor=Staff.full_name) INNER JOIN
-
Reader_Report_Information
-
ON Acquisitions_Manuscript.manuscript_id=Reader_Report_Information.manuscript_id)
-
ON Personal_Information.personal_id=Reader_Report_Information.personal_id
NeoPa 32,556
Expert Mod 16PB - SELECT Acquisitions_Manuscript.title,
-
Acquisitions_Manuscript.subtitle,
-
Acquisitions_Manuscript.authors,
-
Personal_Information.professional_title,
-
Personal_Information.last_name,
-
Personal_Information.full_name,
-
Reader_Report_Information.due_date,
-
Reader_Report_Information.honorarium_amount,
-
Reader_Report_Information.number_honorarium_books,
-
Reader_Report_Information.review_length,
-
Reader_Report_Information.notes,
-
Acquisitions_Manuscript.edited_volume,
-
Acquisitions_Manuscript.acquisitions_editor,
-
Staff.staff_title,
-
Personal_Information.email
-
-
FROM Personal_Information INNER JOIN
-
((Acquisitions_Manuscript INNER JOIN
-
Staff
-
ON Acquisitions_Manuscript.acquisitions_editor=Staff.full_name) INNER JOIN
-
Reader_Report_Information
-
ON Acquisitions_Manuscript.manuscript_id=Reader_Report_Information.manuscript_id)
-
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.
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.
Thanks NeoPa.
The Acquisitions_Manuscript.acquisitions_editor in a lookup as follows... - SELECT [Staff: Active Acquisitions].full_name
-
FROM [Staff: Active Acquisitions]
-
ORDER BY [full_name];
It is textual, do you still think this is/might be the problem?
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.
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. :-(
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 :)
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
| |