I created a copy button in an Access form to copy the Data in the fields that users enter so they can paste it in an internal system.
I created VBA code "on the click:
Private Sub Command6_Click()
On Error GoTo Err_cmdDuplicate_Click
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
Exit_cmdDuplicate_Click:
Exit Sub
Err_cmdDuplicate_Click:
MsgBox Err.Description
Resume Exit_cmdDuplicate_Click
End Sub
I am having 2 problems:
it copies all the data with the headers but pastes it vertically rather than horizontally. I guess it needs to be formatted. I have to add since the code was grabbing everything in the form even the information that I didn't want. I created a query then a report based on the query then made the copy button with the code behind it.