Hello All,
I have a code that adds a new record but it asks the user if they really want to do that. If they choose "no" I wanted it to go back to the previous record. This what I tried but it doesn't work.
Any Ideas?
I have a code that adds a new record but it asks the user if they really want to do that. If they choose "no" I wanted it to go back to the previous record. This what I tried but it doesn't work.
Code:
Dim rs As Recordset
If Me.NewRecord Then
Me.productid.Visible = False
If MsgBox("Add a New Quote?", vbYesNo, "New Quote") = vbYes Then
Me.[Product ID] = Nz(DMax("[product ID]", "product"), 1000) + 1
Me.productid.Visible = True
Else
If vbNo Then
rs.MovePrevious
End If
End If
End If
End Sub
Any Ideas?