This is probably simple, yet I'm not getting it. I am using a form to update records in a table. To prevent duplicate records from being entered, I am requiring a new revision number to be entered when changes are made to the existing records before the new record can be saved. That part works. The part that doesn't work is getting the command button to automatically add +1 to the existing revision number when entering the record. Here is the VBA I'm trying to use. (It amazes me I got this far!) Help please? Thanks.
Private Sub cmd_ReviseRecordButton_Click()
On Error GoTo Err_cmd_ReviseRecordButton_Click
Dim strRevisionVersion As String
strRevisionVersion = ([Revision_Version] = [Revision_Version] + 1)
Me.Revision_Version = strRevisionVersion
DoCmd.GoToRecord , , acNewRec
Exit_cmd_ReviseRecordButton_Click:
Exit Sub
Err_cmd_ReviseRecordButton_Click:
MsgBox Err.Description
Resume Exit_cmd_ReviseRecordButton_Click
End Sub
Private Sub cmd_ReviseRecordButton_Click()
On Error GoTo Err_cmd_ReviseRecordButton_Click
Dim strRevisionVersion As String
strRevisionVersion = ([Revision_Version] = [Revision_Version] + 1)
Me.Revision_Version = strRevisionVersion
DoCmd.GoToRecord , , acNewRec
Exit_cmd_ReviseRecordButton_Click:
Exit Sub
Err_cmd_ReviseRecordButton_Click:
MsgBox Err.Description
Resume Exit_cmd_ReviseRecordButton_Click
End Sub