I have used this code before to populate a new record with a previous records value. This time it is not working. The only difference is the previous time it was on a continuous form and this on is a single form. Can someone point me in the right direction. Thanks again -Pat
Private Sub cmdSaveandNew_Click()
On Error GoTo Err_cmdSaveandNew_Click
DoCmd.GoToRecord , , acNewRec
Exit_cmdSaveandNew_Click:
Exit Sub
Err_cmdSaveandNew_Click:
MsgBox Err.Description
Resume Exit_cmdSaveandNew_Click
End Sub
Private Sub fkSetID_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.fkSetID.Value) Then
fkSetID.DefaultValue = """" & Me.fkSetID.Value & """"
End If
End Sub
Private Sub cmdSaveandNew_Click()
On Error GoTo Err_cmdSaveandNew_Click
DoCmd.GoToRecord , , acNewRec
Exit_cmdSaveandNew_Click:
Exit Sub
Err_cmdSaveandNew_Click:
MsgBox Err.Description
Resume Exit_cmdSaveandNew_Click
End Sub
Private Sub fkSetID_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.fkSetID.Value) Then
fkSetID.DefaultValue = """" & Me.fkSetID.Value & """"
End If
End Sub