How to make a 'Paste' Button

PeterWieland

Registered User.
Local time
Today, 13:47
Joined
Sep 20, 2000
Messages
74
Hi,

I have a data entry form with several fields that have information typed in. There is also one text field that would normally have information pasted in from the clipboard. However, my users cannot manage to highlight the correct field when pasting, so I get all sorts of rubbish appearing in the records.

I want to put a button on the form that will paste the clipboard to the correct field, regardless of where the current focus is. I can then disable the paste button on the toolbar.

I know how to set the focus with the button, but how do I get it to Paste?

Thanks in advance

Peter
 
Peter,

Try this in the OnClick event of your button


Private Sub Command0_Click()

Me.YOUR TEXT BOX.SetFocus
DoCmd.RunCommand acCmdPaste

End Sub


Let me know how you get on

IMO
 
Thanks a lot IMO, that did the trick!

Peter
 
Glad I could help.

IMO
 

Users who are viewing this thread

Back
Top Bottom