Full Version: Paste clipboard data into fields on a form
UtterAccess Forums > Microsoft® Access > Access Forms
NineIron
I want to copy data from a MEDITECH screen, then paste that data into textboxes on a form.
Any chance that this is possible?
dashiellx2000
If you are manually copying the data from the MediTech screen, you can use a button on the form with the following code:
!--c1-->
CODE
Me.ControlName.SetFocus
DoCmd.RunCommand acCmdPaste

The above will paste the data into a specific control. If you want to keep the control variable (i.e. paste data into more then one control) you can use: Screen.PreviousControl.SetFocus --This assumes that the control you want to paste two was the last one have the focus.
HTH
NineIron
I don't think I was very clear. There will be several "fields" of data that I want to "pick" out of what is copied, then paste the specific "pieces" into separate fields. The best I can come up with is pasting the stuff into a memo field, then parsing out the pieces I want.
Any ideas?
doctor9
What I have done with a similar situation was to paste the values into an unbound textbox, and then use VBA to parse out the values to the appropriate controls. Of course, your values will need to have some way of knowing where one value ends and the next one begins.
You might want to try pasting the multiple values into a textbox several times, and then see if you can find predictable patterns that can be converted into coded rules for separating the values.
Hope this helps,
Dennis
NineIron
Thanx. I think that is what I'll do.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.