Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-05-2016, 05:49 AM
jmo jmo is offline Merge Object and not displaying Access Queries with VBA Windows 7 32bit Merge Object and not displaying Access Queries with VBA Office 2010 32bit
Novice
Merge Object and not displaying Access Queries with VBA
 
Join Date: Dec 2015
Posts: 7
jmo is on a distinguished road
Default

The document is a contracting document with clauses that are either included or excluded depending upon certain factors. I put in custom document properties which are set via combo boxes. These clauses are stored in fields that are displayed IF a custom document property (via combobox) is set.



When the button to 'run' is pushed it updates all the fields to display the correct clauses. This piece works fine.

It's mail merging the queries which contain access VB that are the problem.

The output from your macro is as follows:

Quote:
Mail Merge Data Source Name:
H:\RDS\ASSESS\2016\Database\2016 OCJP Grants.mdb
Mail Merge Connect String:

Mail Merge Query String:
SELECT [2016 OCJP Grants TABLE].AUTH_AGENCY, [2016 OCJP Grants TABLE].FUND_SOURC, [2016 OCJP Grants TABLE].[2016 EDISON CONTRACT], [2016 OCJP Grants TABLE].BEGDATE, [2016 OCJP Grants TABLE].ENDDATE, [2016 OCJP Grants TABLE].[CFDA #], [2016 OCJP Grants TABLE].[VENDOR ID], [2016 OCJP Grants TABLE].[2016 SPEED CHART], [2016 OCJP Grants TABLE].[ACCOUNT CODE], [2016 OCJP Grants TABLE].FED_ID, [2016 OCJP Grants TABLE].PROJ_DIR, [2016 OCJP Grants TABLE].TITLE_DIR, [2016 OCJP Grants TABLE].ADDR1_DIR, [2016 OCJP Grants TABLE].ADDR2_DIR, [2016 OCJP Grants TABLE].CITY_DIR, [2016 OCJP Grants TABLE].PHONE_DIR, [2016 OCJP Grants TABLE].ZIP_DIR, [2016 OCJP Grants TABLE].EMAIL_DIR, [2016 OCJP Grants TABLE].FEDFUNDS16, [2016 OCJP Grants TABLE].MTCH_FUNDS16, [2016 OCJP Grants TABLE].FEDFUNDS17, [2016 OCJP Grants TABLE].MTCH_FUNDS17, [2016 OCJP Grants TABLE].ALL_FUNDS, [2016 OCJP Grants TABLE].MGR_NAM, [2016 OCJP Grants TABLE].MGR_GENDER, [2016 OCJP Grants TABLE].PHONE_MGR, [2016 OCJP Grants TABLE].MGR_EMAIL, [2016 OCJP Grants TABLE].[Agency FY End Date], English([ALL_FUNDS]) AS WORD_NUM, SpeedtoFain([2016 Speed Chart]) AS FAIN, SpeedtoDate([2016 Speed Chart]) AS AwardDate, SpeedtoAmount([2016 Speed Chart]) AS AwardAmount, SpeedtoAA([2016 Speed Chart]) AS AwardingAgency, SpeedtoContact([2016 Speed Chart]) AS FederalContact, SpeedtoPhone([2016 Speed Chart]) AS ContactPhone, SpeedtoAwardName([2016 Speed Chart]) AS GrantName, NumofMonths([BegDate],[EndDate]) AS NumMonths, ConvertNumberstoEnglish([NumMonths]) AS MonthWords
FROM [2016 OCJP Grants TABLE]
WHERE ((([2016 OCJP Grants TABLE].MGR_NAM)=""John Doe""));
If I copy this directly into the SQLString and run it then it skips all the Access VB sections but if I manually do it and connect as DDE it works fine.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge Object and not displaying Access Queries with VBA Excel worksheet as OBJECT in WORD not displaying mohsin Word 1 03-27-2012 10:43 PM
Merge Object and not displaying Access Queries with VBA Mailmerge with Access queries optiontips.in Mail Merge 2 11-21-2011 03:12 AM
mail merge queries not displaying donwalt Mail Merge 0 09-05-2010 02:41 PM
Merge Object and not displaying Access Queries with VBA flash shockwave object not displaying webguync PowerPoint 7 04-20-2010 07:23 AM
Access Object library 10 Gyto Office 0 10-09-2008 09:04 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:23 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft