X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Importing Multiple Records From Access To Word    
 
   
AlexTheButtonMan
post Jan 21 2012, 11:33 AM
Post #1

New Member
Posts: 18



Hi there.
I am new to this forum and this is my first post.
I have created an Access database in 2010. It is an application designed to work in a shop where the user enters the information on my 'checkout' and then has the option of creating an invoice. I have an invoice template saved with bookmarks, so Access knows where to put the data. What I would like to do is have the ability for the user to select any number of items in the checkout, for instance 1 to 50 or so, and then the word template adding these multiple records until it gets to the last one. Is there a way of doing this? I could set up a few rows in word with their own bookmark names but this isn't as robust as having the option of putting in however many is needed.
Does this make sense?
I hope someone can help me with this?
Cheers
AlexTheButtonMan
Go to the top of the page
 
+
DanielPineault
post Jan 21 2012, 11:44 AM
Post #2

UtterAccess VIP
Posts: 2,993



Firstly, welcome to UtterAccess!
There are different approach to your problem, but I think one way or another you are looking at Word automation (not just a straight forward merge).
You'll need to open your Word Template, goto the table in question, using a loop function insert a row in your table, insert your data cell by cell, next, next, next. This will enable you to add 1-infinity items. I know I have done something similar in the past, let me see if I can digg up some code.
Go to the top of the page
 
+
AlexTheButtonMan
post Jan 21 2012, 12:07 PM
Post #3

New Member
Posts: 18



Hi DanielPineault. Thanks for your very quick response to this. I am not that familiar with MS Word and don't fully understand what you mean. How do I add a loop function to a cell? Do you mean create a macro in Word that runs every time Access tries to write data to it? You did mention you could dig out some code so perhaps that might explain things for me
Cheers
Go to the top of the page
 
+
theDBguy
post Jan 21 2012, 12:45 PM
Post #4

Access Wiki and Forums Moderator
Posts: 59,421
From: SoCal, USA



Hi AlexTheButtonMan,
welcome2UA.gif
Pardon me for jumping in...
Are you talking about inserting a "table" in your Word document? Perhaps some screenshots would help us understand what you're trying to accomplish.
Just my 2 cents... 2cents.gif
Go to the top of the page
 
+
AlexTheButtonMan
post Jan 21 2012, 02:23 PM
Post #5

New Member
Posts: 18



Hi theDBguy
I have inserted 2 screen shots. One showing the payment screen in Access the next showing the invoice that I would like the data in the payment screen to appear. I hope this gives more details?
Cheers
AlexTheButtonMan
Attached File(s)
Attached File  payment_screen.jpg ( 90.73K ) Number of downloads: 7
Attached File  invoice.jpg ( 88.04K ) Number of downloads: 7
 
Go to the top of the page
 
+
theDBguy
post Jan 21 2012, 02:50 PM
Post #6

Access Wiki and Forums Moderator
Posts: 59,421
From: SoCal, USA



Hi,
Thanks for posting those images. Sounds like Daniel is correct that you might need automation code for something like this.
However, is there any reason why you're using Word for invoicing instead of an Access report?
Just my 2 cents... 2cents.gif
Go to the top of the page
 
+
AlexTheButtonMan
post Jan 21 2012, 03:26 PM
Post #7

New Member
Posts: 18



To be honest I hadn't considering using an Access report. I'm not an expert in the Access reports but would I be able to create a template that looks like the one I created in Word?
Cheers
AlexTheButtonMan
Go to the top of the page
 
+
theDBguy
post Jan 21 2012, 04:59 PM
Post #8

Access Wiki and Forums Moderator
Posts: 59,421
From: SoCal, USA



Hi,
Yes, you should be able to create a report that looks exactly like your Word document.
Good luck!
Go to the top of the page
 
+
AlexTheButtonMan
post Jan 22 2012, 06:42 PM
Post #9

New Member
Posts: 18



Hi theDBguy
That worked a treat, thanks for your help!
Cheers
Alex
Go to the top of the page
 
+
theDBguy
post Jan 22 2012, 07:37 PM
Post #10

Access Wiki and Forums Moderator
Posts: 59,421
From: SoCal, USA



Hi Alex,
Glad to hear it worked for you. Daniel and I are happy to help.
Good luck with your project.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Search  ·  Go to Top  ·  Lo-Fi Version Time is now: 22nd December 2014 - 02:27 PM