L'apprentis
Redcifer
- Local time
- Today, 09:24
- Joined
- Jun 22, 2005
- Messages
- 177
Hi everybody,
I have written a small procedure to increment one of my field by 1 each time the new record button is pressed but I keep getting the following Message:
"You Canceled the previous operation"
Here is the code:
Does anybody know why I am getting this message?
I have written a small procedure to increment one of my field by 1 each time the new record button is pressed but I keep getting the following Message:
"You Canceled the previous operation"
Here is the code:
Code:
Private Sub CmdNew_Click()
Dim inumber As Integer
DoCmd.GoToRecord , , acNewRec
inumber = Nz(DMax("[EnquiryNo]", "TblEnquiry"), 0)
Me.TxtEnquiry = inumber + 1
Me.TxtEnquiry.SetFocus
End Sub