Hello
I have a problem where i am trying to count the number of records i enter into a form. I have a count txtbox which is locked and only displays a number of records entered. The code below only seems to display one every time i exit the First name field is there something wrong with my code (below)
Private Sub txtName_Exit(Cancel As Integer)
Dim intCounter As Integer
intCounter = 0
If intCounter < 50 Then
Counter = intCounter + 1
TxtCount = intCounter
Else
If intCounter = 50 Then
MsgBox ("G"
End If
End If
End Sub
So basically on exiting the first name field add one to the counter(incounter and display in txt box) then when reaching 50 display a message ("full" and then reset counter to 0. This is what i would like the program to do but for some reason it is not please can anyone help.
Thank you for your time.
I have a problem where i am trying to count the number of records i enter into a form. I have a count txtbox which is locked and only displays a number of records entered. The code below only seems to display one every time i exit the First name field is there something wrong with my code (below)
Private Sub txtName_Exit(Cancel As Integer)
Dim intCounter As Integer
intCounter = 0
If intCounter < 50 Then
Counter = intCounter + 1
TxtCount = intCounter
Else
If intCounter = 50 Then
MsgBox ("G"
End If
End If
End Sub
So basically on exiting the first name field add one to the counter(incounter and display in txt box) then when reaching 50 display a message ("full" and then reset counter to 0. This is what i would like the program to do but for some reason it is not please can anyone help.
Thank you for your time.