Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2002 Mail Merge from Access 2002 Query

Status
Not open for further replies.

ufi

MIS
Mar 21, 2003
2
US
I didn't start having this problem until we upgraded to Office 2002.

I have created a query in Access. I am using an IIf statement in a field to create a new field. This is what I am trying to do:

Field Name: Income_Limit_%
If the above field has the number 50 in it, my new field will say "Yes", if it does not have the number 50 in it, it will say "No".

New Field Name: Test
In my query I have the following typed in the row labelled "Field:":

Test: IIf([Main]![Income_Limit_%]Like "*50*","Yes","No")

Let's say there is a 50 in my field. While I am in Access and I view my query, the data in the Test field will be "Yes", which is correct. But (and this is where the problem is), when I merge the Test field into my Word document the data shows up as "No", which is wrong. My temporary fix is to rewrite my field by switching "Yes" and "No (Test: IIf([Main]![Income_Limit_%]Like "*50*","No","Yes"). If I do this, I have incorrect data in Access, but my merge document is correct.

What can I do, if anything, to make sure my data is the same on both my Word document and in my Access database?

Any help would be much appreciated.
 
Instead of merging directly to Word 2002 can you run your query to a temporay table and merge the table to word 2002? If I understand whats happening you would not have any database operations moving across applications this way.

This does not answer why it does what it does but it mat work.

Good luck

David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top