I’m a research coordinator for a neurosurgeon and I’m trying to create a research database in Access 2003 using data from a bunch of old Excel worksheets that he has lying around. Once it’s up and running, the data in the Access database will have to be updated on a regular basis. This may require looking up 100-150 patients a day in the hospital’s computer system.
The hospital’s system requires the patient’s name to be entered all on one line: last name, first name middle initial. I ’ve created text box on my data entry form that arranges the patient’s name in that order. In order to look up a patient’s record I have to click on the combined name textbox, highlight the text, and hit ctrl-c. I then plunk it into the name field in the hospital’s system using ctr-v and hit enter
What would really speed things up is if I had a control button that when I clicked on it the text in the combined name textbox would be copied to the clipboard all in one motion. I’ve created the control button, but I have no idea how to write the macro or whatever that will control it.
I’ve attached a sample database so you can see what I’m talking about. Thanks.
Last edited by Research RN; 08-04-2009 at 05:33 PM.
As far as I know you will need to use the Windows API to use the clipboard - Whether or not I am right here is an example http://www.mvps.org/access/api/api0049.htm
Hi
maybe this will work for you
Enter the following on the click event of the Copy Button
Code:Me.Text13.SetFocus DoCmd.RunCommand acCmdCopy
This moves the focus back to the combined name text box and then copies it.
You should then be able to paste into another application. I only tested with Excel, Notepad and Google but it seems to work.
good luck
qff
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks