Share via

CmdCopy

Anonymous
2015-06-19T09:53:38+00:00

Why would it tell me that this recordset is not updateable (error message) when I run the code below that is called from a form?  All I'm doing is navigating to a the "Account Number" control and coping the content.  Yet if I ask it to navigate to another control on the same form and copy, no problem.  Is it because I'm asking it to navigate to the same control that I click on to run the copy code?  Meaning, that I want to click the Account Number control and copy the number.  I do this SO much throughout the day that I'm get tired of right-clicking and selecting copy.  Just easier to click and move on.

Option Compare Database

Option Explicit

Public Function CopyAccountNumberDocumentCenter()

DoCmd.GoToControl "Account Number"

DoCmd.RunCommand acCmdCopy

End Function

Thank you for the help in advance.

Ken

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

ScottGem 68,830 Reputation points Volunteer Moderator
2015-06-19T17:11:00+00:00

OK, so the ultimate goal is to use the Account Number field to generate an e-mail address, correct?

So, is the code to do the e-mail on the same form? If so, you can just reference the control name in the code. If its not, then use Forms!formname![Account Number] to reference it. Like I sad use value assignments instead of copy and paste.

Was this answer helpful?

0 comments No comments

7 additional answers

Sort by: Most helpful
  1. Anonymous
    2015-06-30T22:36:03+00:00

    Thank you, Scott.  Sorry for the delay.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-06-19T16:49:56+00:00

    that only partially answers my question. clearly you want to copy the value in a Control, but what do you want to do with that value?

    OH, sorry --- paste in email and our site to access an account.  It's nothing more than a step to reduce typing the account number in email or elsewhere.  And prevents from typing the number incorretly as well.

    Was this answer helpful?

    0 comments No comments
  3. ScottGem 68,830 Reputation points Volunteer Moderator
    2015-06-19T15:24:42+00:00

    that only partially answers my question. clearly you want to copy the value in a Control, but what do you want to do with that value?

    Was this answer helpful?

    0 comments No comments