Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 03-10-2018, 07:07 PM   #1
rickadams
Newly Registered User
 
Join Date: Mar 2018
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
rickadams is on a distinguished road
How to Print 1 record or a lot to Word Docx

I have been given the task of exporting and printing (1 up to 800) records to a word docx for a Door entry system.

Basically it prints instructions on how to use the system and includes a directory entry code and an access card number for the tenant. I also will need to print labels for the the cards to give each tenant.
Samples of Users.mdb and Word document Attached:

All of the information in the database is stored in Access 2000 format. It is a purchased program that can't be changed.

I am totally lost on how to do this and really need help.
I need a print button for 1 selected record when a tenant has lost a card (or all the cards for the group), and a print button for some or all the letters for an entire group.

Thank you in advance
Attached Files
File Type: docx Mergefieldsforletter.docx (18.6 KB, 13 views)
File Type: mdb Users.mdb (260.0 KB, 13 views)

rickadams is offline   Reply With Quote
Old 03-11-2018, 12:08 AM   #2
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 4,484
Thanks: 71
Thanked 1,105 Times in 1,030 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: How to Print 1 record or a lot to Word Docx

You say it can't be altered yet you have access to the tables and you want advice on altering it with print buttons for mail merge....

In what way can't it be altered?

Does it have any mail merge code now? If not consider 'super easy mail merge' by albert kallal.

I would also update to an ACCDB file if possible.
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ridders is offline   Reply With Quote
The Following User Says Thank You to ridders For This Useful Post:
rickadams (03-11-2018)
Old 03-11-2018, 02:01 AM   #3
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 1,794
Thanks: 233
Thanked 257 Times in 242 Posts
Gasman will become famous soon enough Gasman will become famous soon enough
Re: How to Print 1 record or a lot to Word Docx

Do it the other way.?
From Word, select the records you want to be printed.

__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is offline   Reply With Quote
Old 03-11-2018, 04:16 AM   #4
rickadams
Newly Registered User
 
Join Date: Mar 2018
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
rickadams is on a distinguished road
Re: How to Print 1 record or a lot to Word Docx

Quote:
Originally Posted by ridders View Post
You say it can't be altered yet you have access to the tables and you want advice on altering it with print buttons for mail merge....

In what way can't it be altered?

Does it have any mail merge code now? If not consider 'super easy mail merge' by albert kallal.

I would also update to an ACCDB file if possible.
Thank you for responding!

The database does not have any mail merge capabilities built in, and they need to stay in 2000 version because the Acessbase2000.exe program by nortekcontrol.com/support/software-downloads which communicates with the door controllers will not allow me to update to the .mdb files to the newer versions ACCDB.

We have 9 buildings on these systems and tenants change all the time.

I have been able to export and fill my forms myself by symbolic linking the cards.mdb, codes.mdb, entrynumbers.mdb, etc with Users.mdb. I am looking for a way to do this quickly without loading, exporting to excel then merging with word. I can make it work that way, however I want to have someone else at the office to be able to simply print a label and give a tenant an instruction sheet from access without getting involved and doing this every time a there is a tenant change or a current tenant lost their card... I attached a screenshot of a form I created with print button however it does not do anything.

I hope I am making sense.
Attached Images
File Type: jpg printformab2000.jpg (86.7 KB, 19 views)
rickadams is offline   Reply With Quote
Old 03-11-2018, 06:15 AM   #5
moke123
Newly Registered User
 
Join Date: Jan 2013
Location: Massachusetts
Posts: 590
Thanks: 0
Thanked 186 Times in 175 Posts
moke123 is on a distinguished road
Re: How to Print 1 record or a lot to Word Docx

Albert has a version for Ac2000.

http://www.kallal.ca/msaccess/msaccess.html
moke123 is offline   Reply With Quote
The Following User Says Thank You to moke123 For This Useful Post:
rickadams (03-11-2018)
Old 03-11-2018, 06:50 AM   #6
Gasman
Access newbie
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 1,794
Thanks: 233
Thanked 257 Times in 242 Posts
Gasman will become famous soon enough Gasman will become famous soon enough
Re: How to Print 1 record or a lot to Word Docx

Quote:
Originally Posted by rickadams View Post
I am looking for a way to do this quickly without loading, exporting to excel then merging with word.
You don't export to Excel, just use Access as the source for the mailmerge.
You might need to create a query to put all the required data into a record, ready for the mailmerge.
__________________
Access novice. Sometimes trying to give something back.
Access 2007
Gasman is offline   Reply With Quote
Old 03-11-2018, 10:11 AM   #7
rickadams
Newly Registered User
 
Join Date: Mar 2018
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
rickadams is on a distinguished road
Re: How to Print 1 record or a lot to Word Docx

Quote:
Originally Posted by Gasman View Post
You don't export to Excel, just use Access as the source for the mailmerge.
You might need to create a query to put all the required data into a record, ready for the mailmerge.
Thank you for responding, I am not trying to sound ungratful.

The only way I can get this database to export all the information I need to merge in word is via Excel after running a report then exporting that report to excel.

I cannot get it to work with a query, I have tried every way I can think of and simply said some of the required data does not transfer to word. Most of the data required is blank and quite a few of the records just do not transfer. It seems nothing from one of the symbolically linked database fills in the info. And I do not know why. Yet as stated above if I create a report they export to excel perfectly ok and the mail merge in word does what I need.


This is why I was looking for help to create run via VBA with a button a user can click to print either 1 or all of the data to the forms. There has got to be an easy way.

rickadams is offline   Reply With Quote
Old 03-11-2018, 11:17 AM   #8
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 4,484
Thanks: 71
Thanked 1,105 Times in 1,030 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: How to Print 1 record or a lot to Word Docx

Sorry to repeat but it really should not be necessary to use Excel as an intermediary step.

Strongly recommend you download albert kallal's mail merge code.
Don't be put off by his 'primitive' web page.
The code is extremely good and easy to use.
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ridders is offline   Reply With Quote
Old 03-11-2018, 11:55 AM   #9
rickadams
Newly Registered User
 
Join Date: Mar 2018
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
rickadams is on a distinguished road
Re: How to Print 1 record or a lot to Word Docx

I have been trying to do this merge from Access to Word since 2014, that right 2014.

I do not know how to get albert kallal's mail merge code to work on the database's I have. There are 9 of them all in different folders. I have been experimenting on test DB's that were copied from real ones so I don't mess anything up. To be honest if I can't do it, I certainly cannot expect my associates to know how to do this. They look at me in amazement when I make it work the way I figured out before which takes hours per DB. That is why I have been asking for help. I do appreciate the suggestions I have received before.
rickadams is offline   Reply With Quote
Old 03-11-2018, 12:29 PM   #10
MarkK
Super Moderator
 
MarkK's Avatar
 
Join Date: Mar 2004
Location: Vancouver BC
Posts: 7,533
Thanks: 10
Thanked 1,242 Times in 1,182 Posts
MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all MarkK is a name known to all
It sounds to me like you are an agent in a for-profit business, and you need a tool. I think if you had a leaky pipe you would hire a plumber. I think if the grass got long, you would buy a lawn-mower, or hire a gardening company. For the problem you are posting about, and for the amount of work you have shown us that you have done on it, I think you should hire an Access programmer. Get the job done right, and write it off an an operating expense.
Spend the money, support our trade, and solve the problem properly. Thanks for you consideration,
Mark
__________________
formerly known as lagbolt | Windows 10 | Access 2010 | Visual Studio 2013 | "Institutions have a vested interest in perpetuating the problems to which they are the solution." - Clay Shirky
MarkK is offline   Reply With Quote
Old 03-11-2018, 12:48 PM   #11
rickadams
Newly Registered User
 
Join Date: Mar 2018
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
rickadams is on a distinguished road
Re: How to Print 1 record or a lot to Word Docx

Mark, thank you for the reply... Unfortunately I am the 60 year old plumber, the electrician, landscaper, roofer, locksmith, volunteer firefighter and paramedic... Etc. Based on your response there probably is a "Paid" solution to my situation however it seems that no one wants to lend a helping hand. Thank you anyway.
rickadams is offline   Reply With Quote
Old 03-11-2018, 01:32 PM   #12
ridders
AWF VIP
Gold Supporter
 
ridders's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 4,484
Thanks: 71
Thanked 1,105 Times in 1,030 Posts
ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough ridders is a jewel in the rough
Re: How to Print 1 record or a lot to Word Docx

Quote:
Originally Posted by rickadams View Post
Mark, thank you for the reply... Unfortunately I am the 60 year old plumber, the electrician, landscaper, roofer, locksmith, volunteer firefighter and paramedic... Etc. Based on your response there probably is a "Paid" solution to my situation however it seems that no one wants to lend a helping hand. Thank you anyway.
I sympathise BUT ...
Actually, several of us have tried to offer suggestions.
There is no real point anyone offering to write code for you when there are high quality, free solutions available
__________________
Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left and leave a comment.

New example databases:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
ridders is offline   Reply With Quote
Old 03-11-2018, 01:59 PM   #13
rickadams
Newly Registered User
 
Join Date: Mar 2018
Posts: 7
Thanks: 3
Thanked 0 Times in 0 Posts
rickadams is on a distinguished road
Re: How to Print 1 record or a lot to Word Docx

So how does one find a programmer? And what is the approximate cost for the question I asked? (A little side humor here: Since Microsoft changed the names of programs to apps in Windows 10, do I now ask for an Apper?)
rickadams is offline   Reply With Quote
Old 03-11-2018, 02:30 PM   #14
moke123
Newly Registered User
 
Join Date: Jan 2013
Location: Massachusetts
Posts: 590
Thanks: 0
Thanked 186 Times in 175 Posts
moke123 is on a distinguished road
Re: How to Print 1 record or a lot to Word Docx

Quote:
The only way I can get this database to export all the information I need to merge in word is via Excel after running a report then exporting that report to excel.
I use albert's code all the time. I have one app that requires nearly 100 merge fields. I found that the simplest way to gather all that information, since it is far from being normalized, was to use a temp table and use a series of insert and update queries to populate that table. Then with Alberts code I simply use "Select * from MyTempTable"

heres alberts code with your 2 tables in it.

Btw, if you can get all the data into a report, i assume you can get it into a form, and thats all you need for alberts code.
Attached Files
File Type: mdb WordMerge2008.mdb (608.0 KB, 9 views)
moke123 is offline   Reply With Quote
The Following User Says Thank You to moke123 For This Useful Post:
rickadams (03-11-2018)
Old 03-12-2018, 06:59 PM   #15
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 26,835
Thanks: 13
Thanked 1,295 Times in 1,234 Posts
Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light Pat Hartman is a glorious beacon of light
Re: How to Print 1 record or a lot to Word Docx

Can you create a new, empty database and link to the tables of the custom app? If you can, then you can modify Albert's tool. I'm also posting a tool that I made. Mine uses bookmarks because I have found my users to be slightly more intelligent than Albert's. In this sample, the merge fields are all hardcoded. In the real application, they are not. The real application supports THOUSANDS of documents. The whole process is tablized. The application offers a couple hundred fields (these are all related to insurance policy documents) and there is a mapping table that maps the bookmarks in a document to fields that the app has made available. There is also a fixed set of tables that can be inserted into a document. The example is in two zip files because a single file would be too large to upload.

Of course, if you can't link to the BE tables, then you're pretty much SOL unless the vendor can provide access for you. Is the BE Jet or is it SQL Server? Do you know?
Attached Files
File Type: zip SampleLetters.zip (446.9 KB, 8 views)
File Type: zip SampleWordAutomation180206accdbNoDocs.zip (413.3 KB, 10 views)

__________________
Bridge Players Still Know All the Tricks
Pat Hartman is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Word Docx based on a field number Lochwood Modules & VBA 1 02-08-2018 12:11 PM
RTF to DOCX jamie_b Modules & VBA 2 08-31-2016 03:34 AM
Export single record to Word to print Lonemascot Forms 1 04-15-2013 02:09 AM
From Access to Word.docx to PDF to Outlook Gijs Modules & VBA 2 10-22-2012 04:36 AM
Help with .docx to pdf conversion craigachan Modules & VBA 0 10-20-2011 01:53 PM




All times are GMT -8. The time now is 05:18 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World