Copying a field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'd like to copy a ceratin field on the current form
I can use the command 'DoCmd.gotocontrol' to move the focus on the field
that I'd like to copy ,but how can i copy it ????????????
 
You may need to supply more information. Copy the value where? To another
field on the same form? To another field on a different form? To the
clipboard?

If Control1 and Control2 are on the same form, you can use:

Me!Control2 = Me!Control1

If they're on different forms, you can use the following (provide Form2 is
already open):

Forms!Form2!Control2 = Me!Control1
 
I'd like to copy it to the clipboard.(that's to say that I'd like to copy it
to paste it in a "word document" for example)
 
Set focus on the field, then use the RunCommand method:

Me.Control1.SetFocus
DoCmd.RunCommand acCmdCopy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top