Find Max of ID Field of a Table in VB (1 Viewer)

a_20120

tan
Local time
Today, 16:25
Joined
Nov 21, 2006
Messages
175
How can I find the Max of a table field in VB, suppose you, when you want to add students, his ID should be automatically added.
 

a_20120

tan
Local time
Today, 16:25
Joined
Nov 21, 2006
Messages
175
Max of Table Field In VB

No one is to reply me for the above problem...

Please guide me how I can I get the max of a field (ID NO) of Table in VB.
 

Rickster57

Registered User.
Local time
Today, 04:55
Joined
Nov 7, 2005
Messages
431
increment

newidnumber= DMax("[idno]", "thetable") + 1

me.idno=newidnumber

or something similar to the above where you have dimensioned the variable newidnumber
 

Users who are viewing this thread

Top Bottom