My Assistant
![]() ![]() |
|
|
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 |
|
|
|
Jan 21 2012, 11:44 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 1,451 |
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. |
|
|
|
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 |
|
|
|
Jan 21 2012, 12:45 PM
Post
#4
|
|
|
Access Wiki and Forums Moderator Posts: 47,914 From: SoCal, USA |
Hi AlexTheButtonMan,
(IMG:style_emoticons/default/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... (IMG:style_emoticons/default/2cents.gif) |
|
|
|
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)
|
|
|
|
Jan 21 2012, 02:50 PM
Post
#6
|
|
|
Access Wiki and Forums Moderator Posts: 47,914 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... (IMG:style_emoticons/default/2cents.gif) |
|
|
|
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 |
|
|
|
Jan 21 2012, 04:59 PM
Post
#8
|
|
|
Access Wiki and Forums Moderator Posts: 47,914 From: SoCal, USA |
Hi,
Yes, you should be able to create a report that looks exactly like your Word document. Good luck! |
|
|
|
Jan 22 2012, 06:42 PM
Post
#9
|
|
|
New Member Posts: 18 |
Hi theDBguy
That worked a treat, thanks for your help! Cheers Alex |
|
|
|
Jan 22 2012, 07:37 PM
Post
#10
|
|
|
Access Wiki and Forums Moderator Posts: 47,914 From: SoCal, USA |
Hi Alex,
(IMG:style_emoticons/default/yw.gif) Glad to hear it worked for you. Daniel and I are happy to help. Good luck with your project. |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th May 2013 - 06:59 AM |