Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gererating numbers

Status
Not open for further replies.

jamie13

MIS
Jan 15, 2002
43
0
0
CA
Hi all,
I would like to know if anyone can help.
I need to generate a 6 digit number beginning with the first letter of the name of the account owner. For example if I am in charge of the account "Jamie" I would need to generate number J000001 for the first account and so on, but i Alex owned an account his first number would be A000001. Is there any way to do this?

Thanks
Jamie
 
left([name],1) & mid(dmax("accountnum","tblname", "name = '" & me.name & "'"),2)

once the account is created just using
dmax("accountnum","tblname", "name = '" & me.name & "'")+1 should work

I hope you are not planning on this being your index
as john and joe and jill would all be the same
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top