How do you assign player numbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am entering registration forms for a ball team. I have a player number
field that indicates the order in which the kids sign up. How do I get that
player number assigned?
 
The most obvious way to do that is to enter it at the time you enter the
rest of the information for new kids. However, I suspect that's not what you
want. I believe you are looking for a way to enter a new player sequence
number AUTOMATICALLY, correct?

You can use the DMAX function to look up the largest (maximum) existing
Player Number and increment it by 1 to generate the next number.

One way to accomplish this is to put the following in the After_Insert event
of the form through which you add new players.

Me.TxtPlayerNumber = DMax("PlayerNumber","tblPlayers")+1

HTH

George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top