Hello. Just a heads up I'm new to this forum and a novice in Access (in particular VBA)so i apologize if I don't sound techy. I need help on a code. I created a form that contains details of requests processed. There will be situations where 2-3 records will be created where 50% of the data are the same. I created a command button that will copy details of the current record to a new one. However there are fields that I want blank because these will contain different information. I used the control button wizard and converted it to a vba code. It does work however it copies everything. What I want to happen basically is when i click on the button it copies the current record but clears out info on certain fields and I will just manually update the info in those fields and save it.
Below is the code I'm using:
'------------------------------------------------------------
' CopyFrom_Click
'
'------------------------------------------------------------
Private Sub CopyFrom_Click()
On Error GoTo CopyFrom_Click_Err
On Error Resume Next
DoCmd.RunCommand acCmdSelectRecord
If (MacroError = 0) Then
DoCmd.RunCommand acCmdCopy
End If
If (MacroError = 0) Then
DoCmd.RunCommand acCmdRecordsGoToNew
End If
If (MacroError = 0) Then
DoCmd.RunCommand acCmdSelectRecord
End If
If (MacroError = 0) Then
DoCmd.RunCommand acCmdPaste
End If
If (MacroError <> 0) Then
Beep
MsgBox MacroError.Description, vbOKOnly, ""
End If
CopyFrom_Click_Exit:
Exit Sub
CopyFrom_Click_Err:
MsgBox Error$
Resume CopyFrom_Click_Exit
End Sub
==================================
Any help will be greatly appreciated.