Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copying data from database to windows clipboard 1

Status
Not open for further replies.

integritycare

Technical User
Mar 12, 2011
151
0
0
AU
Hello,

Is it possible to be able to copy some data from an access form to the clipboard in windows XP.
If it is, how is it done.

Many thanks

Integrity
 
Well the easy answer is of course. Just highlight and select copy or use ctrl v. I assume there is more to this question, so explain in detail what you are really trying to do and why.
 
Hi MajP

Many thanks for your reply. Yes there is a bit more to this question.
On the invoice system we print to a PDF writer. The user has to then use the invoice number for the filename.
Occasionally the user has over written the file name without realising what they have done. Even though a dialog box does ask "Do you want to overwrite this file."
Just thought, that when the invoice is generated, the invoice number could be copied to the clipboard and then to get the user to paste from the clipboard as the file name when prompted...

Could this work?

Regards,

Integrity
 
I still do not quite understand. Not sure why I would have to copy and paste. I would either have a form where I can choose an invoice number, or a button on the form that generates the invoice to save as a PDF with the invoice number as the file name. It should all happen automatically. Hit the button and it saves as a PDF with the invoice number as the name, to the specified or user defined directory.
 
Hi Majp,

Many thanks for you reply.
Yes you are correct "generates the invoice to save as a PDF with the invoice number as the file name"
But just not sure how to print the access report to PDF, apart from printing to a PDF printer, and for it to save as with the invoice number as file name.
Perhaps you could give me an idea where to start.
I guess I need to have some module to print access reports to PDF, but how...?

Thanks,

Integrity
 
It has been pretty long since I did this in 2003, so I cannot remember how it was done. I think I used the following code or some modified version of the code

I also think the docmd.runcmd accmdcopy has some limitations where you need to first set focus to the text and select it. You may want to look at an API version

Also it may be time to start thinking about upgrading if financially and technically feasible. 2003 was a good stable version of Access but 2007 provided a lot of improved functionality and a different db format. Your about to fall 3 versions behind.
 
Hi MajP,
Thanks for your help. I have wanted to upgrade to 2007 but management wont release finance. They run server 2003 and have been advised that they would have to upgrade that as well...

so for now we're stuck with it!

Integrity
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top