0

Below code is in my DB file.
If I enter a card no in first record, for Others card no will be automatically comming.

but for the other "Test " I want to show the record no automatically.
I was coded below. but it's not working.
Pls help me.
Thank you.

Dim card As Long
Dim aNumber As Long
 
Private Sub CardNo_AfterUpdate()
    card = card + 1
End Sub

Private Sub CardNo_BeforeUpdate(Cancel As Integer)
    card = CardNo.Text    
End Sub

Private Sub CardNo_GotFocus()
    If CardNo.Text = "" Then
        CardNo.Text = card
    End If
End Sub

Private Sub test_AfterUpdate()
    aNumber = aNumber + 1
End Sub

Private Sub test_BeforeUpdate(Cancel As Integer)
    aNumber = test.Text
End Sub

Private Sub test_GotFocus()
    If test.Text = "" Then
        aNumber = 1
        test.Text = aNumber
    End If
End Sub
3
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Drlionheart
0

Every Data base can support auto numbering .......

can I know that for which database you connect to the system........

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.