problem sending Access data to Word MailMerge

Using Access 2003 the following code used to work.  The user would click a 
button, Word and then the MailMerge original doc would open, and then the 
user would have to select which table in the database held their required 
data.  The table was created in the code immediately preceding the MailMerge 
coding below, and the TableName is stored in the string field strTable.


++++  start of code
        Dim objWord As Word.Document
        
        Set objWord = GetObject(gstrMergeDocument_ACTION_PLAN, 
"Word.Document")
        
        objWord.Application.Visible = True
        
        objWord.MailMerge.OpenDataSource Name:=CurrentDb.Name, 
LinkToSource:=True, Connection:="TABLE " & strTableName
        
        objWord.MailMerge.Execute
++++  end of code

This had been working for several months, but now the processing only opens 
the Word MailMerge original document, without giving the user the facility to 
select the table.  Access now gives an error on the CommandButton coding, 
number -2147417851

I have amended the coding adding

sqlstatement:="select * from [" & strTableName & "]"

after the Connection parameter.  This does what is wanted, filling the doc 
with the table information, making it more user friendly (they do not have to 
select their table"

Were we just lucky that the original coding worked for that period of time, 
or is there something deeper which I need to investigate?
-- 
Thanks in advance, Jill C
0
Utf
5/10/2007 8:59:02 AM
access.reports 4434 articles. 0 followers. Follow

0 Replies
800 Views

Similar Articles

[PageSpeed] 23

Reply:

Similar Artilces:

Problem shortcuts in Word
Hello, I work with Word 2008. In the beginning there is no problem, but suddenly i have problem with shortcuts. When i want to do "cmd c" it make an other shortcuts same thing for "cmd s", "cmd v" and surly some other. But when i write there is no problem "c" is "c"... If somebody have an idea please help me. Thank you. Unless you indicate your specific update level of Office as well as OS X & describe what the keystrokes *are* doing contrary to what you expect there isn't much we can offer. -- Regards |:>)...

encoding problem in Outlook 2007 importing Outlook 2000 personal folders
I use Outlook 2007 to import the pst file of Outlook 2000. The Chinese characters in the subject became unreadable but it's ok to display in message body. In Outlook 2000, there's no problem to display the Chinese characters in the subject. What's wrong with Outlook 2007? What setttings should I change to fix the problem? Thanks. cyl <u8526505@gmail.com> wrote: > I use Outlook 2007 to import the pst file of Outlook 2000. The Chinese > characters in the subject became unreadable but it's ok to display in > message body. In Outlook 2000, there's no problem t...

Access 97 executables and other versions of Access
I have a few questions regarding Access 97 and other versions of Access as we don't have time to develop .net versions of our Access 97 databases and some of our users are moving to other versions of Office/Access - I work for a local authority hence we tend to be very slow in moving to newer technology! We've tried converting our Access 97 databases (lots of front end forms) into Access 2000 but they fail and we don't want to install two versions of Access due to having our applications delivered via Novell to the user (PC's are locked down). Do we need to purchase...

Outlook 2003 PST problems
I just installed Office 2003 professional on a new computer & am having problems with outlook. I copied my Outlook.pst file into the appropriate directory & although it is recognized the calendar is not working properly. I cannot attach any of the colored labels to my appointments - so everything is pretty much in black & white. I totally uninstalled & reinstalled office... first removing my pst file... but there appears to be an ini file... or something that is retaining some information... does anyone know of a fix for the labels... or how to TOTALLY uninstall office (so I...

Outlook not sending messages from correct POP3 account
I am a tech support person, supporting several companies from my home. Therefore, I have several pop3 email accounts setup on my computer in Outlook. When I reply to an email, I need to make sure that the correct account shows up in the "From" field. This works for some messages, but for others, the email is sent from the wrong account (making me look real bad :-)). This happens even when it says it's going to be sent from the correct account, if I check the sent items afterward, I'll see that it was sent from the wrong account. This is driving me batty and I nee...

Problem with Authentication
The CRM application was running smooth. But now I can't logging. It ask my credentials and than return a 401.1 error. I had already reinstalled the CRM server but it won't work. I'm accessing it in the same local network. I'm running CRM 3.0 in SBS. Best regards, Erico Hi When you open a Internet explorer and type the name of the CRM server, it prompts for user and password ? Are you logged in with domain credentials ( AD user ) ? If you are, so add url of the crm server in Local intranet. Enable "Automatic logon only in intranet", this is under security,c...

Vista blue screen problem...please help!
I've seen some other threads, here are the dump files: 'RapidShare: 1-CLICK Web hosting - Easy Filehosting' (http://rapidshare.com/files/347103149/Minidump.rar.html) Please, help me out here. -- ceVil It might be better to know at what point the bsod occurs and what the actual err.msg given is "ceVil" <guest@unknown-email.com> wrote in message news:0b9a0c60b90bf6c0be88bda30f2820ab@nntp-gateway.com... > > I've seen some other threads, here are the dump files: > 'RapidShare: 1-CLICK Web hosting - Easy Filehosting' > (...

calendar problem
Dear all, I am using both mail and calendar function in outlook 2002. Everything is ok until recently, when I try to make a new appointment or checking any old appointments, an error message "out of memory or resource, try to close some windows..." pop up. The mail function is still ok. Can anyone tell me how can I solve this? I have already installed sp2. The version of office is the professional one with frontpage. Thanks. tp ...

problem #4
Hi, I am facing this new problem... i.e a user has installed Office 2003 on win2k prof platform.. whenever she is working on a outlook.. she gets a Microsoft error message... saying to send the report or don't send the report... Usually I have seen this problem in IE... But for outlook it is new to me... after clicking on send or don't send report.. the outlook closes. And there are no IE open..... and if atall it is open.. the IE does not close... Need your help regards, KAH What is logged to the Event Viewer regarding this? Try one of the following already; http://www.howt...

Copy Filtered Data
I am filtering my data that is in the range A:AJ starting on row 13 with headers and having a variable ending row. My filter criteria is Column 1 not blank and Column 11 ="s". I would like to copy the filtered date (No headers) to another work book beginning in BE3. Thanks! Hi, Once the data is filtered, highlight it, press CTRL + G, special, visible cells only, press CTRL + C, go to the sheet where you want the information and press CTRL + V "sailor4life61@yahoo.com" wrote: > I am filtering my data that is in the range A:AJ starting on row 13 > wi...

In Word 2000 how do I undo Skip Record If
In creating my first mail merge file I thought the "Skip Record If" might work for me. I will be running this mail merge on a monthly basis and used a date in the Compare To: box which will only work for the current month. How do I undo the "Skip Record If" so I can sort my data through the recipient list? -- Thanks, ChrisR Your post in the mailmerge.fields newgroup has been answered. Please do not post the same question separately to multiple newsgroups. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my se...

Access denied when forwarding
When I am working remote using webmail, after being logged on and receiving mail...when I try and forward a mail message I get a "access denied" error When I am logged on as a MAPI client....everything works fine. Any ideas? Thanks, Jeff ...

95 and 97 problem
For some unknown reason there is Excel 95 and 97 on this pc.When i double click on an Excel file, the pc defaults to the 95 program (Which incidently doesn't work properly). So my question is how do i get the pc to default to 97. Cheers Craig Craig, Have a look at Windows Help. From Windows 2000 Help (Index under Programs Associating with File Types) To change which program starts when you open a file In My Computer or Windows Explorer, on the View menu, click Folder Options. Click the File Types tab. In the list of file types, click the one you want to change. Click Edit. In Act...

Date problem
I can't believe there's no post on this, but I can't find it. I've tried the solutions I could find (see below) and still get the error: "The expression is typed incorrectly or it is too complex to be evaluated. For example....Try simplifying...." I have a date field, formatted as Date/Time, General Date, default Value = Now(). I like having the date and the time - in case we need it. I want to run a report on calls taken just for one day. I have CallDate: CallDateAndTime in my query, with "criteria" as Between ([Forms]![frmReports]![txtStartDate]) A...

how to skip a column when entering data?
On one worksheet, for the sake of appearance Column B contains a calculated amount, which is the product of Column A and Column C. Is there a way to skip to column C when entering the data in Column A without doing it manually? Thanks, Godzilla This will give you the idea. right click on sheet tab>view code>insert this>SAVE Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) If Target.Row > 2 And Target.Column = 1 Then ActiveCell.Offset(, 2).Select End Sub "Godzilla" <Godzilla@monster.org> wrote in message news:MPG.19e3d6a7ae92e03398971a@news....

sync problems
I have all of my info on an HP Ipac. I had to reformat the hard drive and I did not make a back-up file. I am trying to move everything back to the computer but it says there is an error with syncing it. How can I move everything from the PDA back to Outlook again? Please help- thanks ...

Won't send/receive emails automatically
I am able to send and receive emails, but only if I click the send/receive button. I have checked the settings and it IS set to send automatically but it doesn't. Can anyone help? >-----Original Message----- >I am able to send and receive emails, but only if I click >the send/receive button. I have checked the settings and >it IS set to send automatically but it doesn't. Can >anyone help? >. >We have had that happen when Outlook was working offline. We could if you posted your Outlook version and what settings you checked. Did you set up an automa...

data return based on two criteria
Hello, I have the following data in excel A2:A5 - cells are merged and contains partnumber (alpha numeric & numeric) C1:AF1 - DATE C2 - initial stock (number) C3 - receipts data (number) C4 - production (number) C5 = available stock (C2+C3)-C4 Similar data is maintained for 25 partnumbers I would like to have a sheet where the users can input date & partnumber and get available stock data. Your help will be highly appreciated. Regards, Jimmy Joseph Hello, Help please! Jimmy Joseph <jimmy.joseph@in.bosch.com> wrote in news:Xns97DB7A8693AB8jimmyjosephinboschco@clien...

Installation Problem!!
I am having a problem installing MSCRM 1.2. My configuration consists of a Domain Controller running Win 2000 Server SP4 . I am trying to install MSCRM on a member of the domain running Windows 2000 Server SP4. There is a DNS Server on the DC which is integrated with AD, and a SQL Server 2000 running on the Win 2K machine. The install errors out when CRM creates the root business with the message: Setup was unable to install Microsoft CRM Server. Setup was unable to provision your organization. Setup was unable to create the root business. The configuration of ASP.NET seems to be ok, the pr...

Data Ribbon disabled
I'm trying to do a "what-if analysis" for my beginning Excel class and when I click on the appropriate cell and then the Data ribbon, all of the options are greyed out. While struggling with this, I noticed the options on the Insert ribbon are also greyed out but the other tabs are fine. I appreciate any insight. Hi, Check the Review tab, the worksheet may be protected. Check you do not have multiple sheets selected, [Group] will be displayed in the title bar is you have. Cheers Andy Akcath wrote: > I'm trying to do a "what-if analysis"...

Extender-Create a new data entry window
Is it possible to create a new extender form or window (not sure of the terminology) to enter data into Dynamics? Specifically the Sales Forecast Window in Manufacturing is terrible for entering data, everytime you move to the right, it the scrolling window jumps back to the top and you have to find the item again. Anyway, I would like a new window to enter a sales forecast, is this possible? thanks -- Doug Unfortunately Extender data is stored in Extender tables and cannot be stored in the Sales Forecast tables. I agree with you that the data entry screen is horrible. I am tal...

Office 2007 - HELP
I have used Word for many years and love it - not too thrilled with the changes in Office 2007, but my bigger issue is with Publisher 2007. I have an image that I have used in Word just fine - meaning, the on screen colors are correct and when printed the colors are correct. Someone sent me a Publisher file and asked me to add the image - I did this - now the image is messed up - the colors are correct on screen, but when printed FROM MY computer the image colors are all wrong - but if I transport the file to a different computer it prints fine I have reinstalled Office - no good Any id...

Resource editor problems
Hello all, Under VC++ 7.1... Please consider these two lines: IDC_ARROW_ADD_CANCEL DISCARDABLE "res\\cur00004.cur" IDC_ARROW_ADD_CANCEL CURSOR DISCARDABLE "res\\cur00004.cur" The second is a hand-edited change to the first. Both will compile just fine in the resource compiler. However, after I use a text editor to make this change, I cannot open the .rc file in the resource editor. The resource editor issues the following error open attempting to open the .rc file: error RC2135 : file not found: CURSOR Can anyone shed light on what's going on here? Thanks, Dave ...

Problems Creating a disclaimer in Exchange 2003
I am trying to create a server based disclaimer that will stamp all of my smtp emails going to the internet. I have been following KB article 317680 with no luck. I get an error like the one below. Binding Display Name Specified: smtpscriptinghost ** Registration Failed ** Err.Number (HRESULT) = 0x1AD Err.Description = ActiveX component can't create object ProgID = cdo.ss_smtponarrival COM Category = {FF3CAA23-00B9-11d2-9DFB-00C04FA322BA} Corresponding Event = onarrival ** Have you registered your sink COM class on this machine? I am puttin...

Directory Replication Problem #2
Hi, recently my Exchange Server directory database receives changes from other servers but does not send out its own changes. Check from the knowledge base, to correct the USN discrepancy need to use Authrest.exe (need to amke changes for about 100+ users). Does anybody know where to get this file 'Authrest.exe' for exchange server 5.5? Exchange server 5.5 CD only provide this file for ver.4.0. Have anyone use it before? Regards, "Sharon Tan" <sharon_tansk@yahoo.com.sg> wrote: >Hi, recently my Exchange Server directory database >receives changes from ot...