J
Jon-e-walker
Can somebody Help Me how can I automate Access to Produce an ID
depending on the amount of People on a Personel Data Table that have a
Particular Personnel Title Assigned (Personnel_Type)
I want my Loan Officers with to have ID's arround the 100's
I want my Mortgage Brokers to have ID'd arround the 200's
and so on...
without reusing an ID that alredy Exists.... so I though... If I
want to add a Loan officer... I first count the number of Loan
Officers already on the DateBase... then add 101... and If you may...
how can I add the letters "LO" infront of the number that is to be
created... Thanks
Here is the Code I tried
Private Sub Personnel_Type_AfterUpdate()
Dim intLO As Interger
Dim intMB As Interger
Dim intLP As Interger
Dim intAS As Interger
If Personnel_Type = "Loan Officer" Then
intLO = DCount("[Personnel_Type]", "Personel Data Table",
"[Personnel_Type]='Loan Officer'")
ID = intLO + 101
End If
If Personnel_Type = "Mortgage Broker" Then
intMB = DCount("[Personnel_Type]", "Personel Data Table",
"[Personnel_Type]='Mortgage Broker'")
ID = intMB + 201
End If
If Personnel_Type = "Loan Processor" Then
intLP = DCount("[Personnel_Type]", "Personel Data Table",
"[Personnel_Type]='Loan Processor'")
ID = intLP + 301
End If
If Personnel_Type = "Admin Staff" Then
intAS = DCount("[Personnel_Type]", "Personel Data Table",
"[Personnel_Type]='Admin Staff'")
ID = intAS + 401
End If
depending on the amount of People on a Personel Data Table that have a
Particular Personnel Title Assigned (Personnel_Type)
I want my Loan Officers with to have ID's arround the 100's
I want my Mortgage Brokers to have ID'd arround the 200's
and so on...
without reusing an ID that alredy Exists.... so I though... If I
want to add a Loan officer... I first count the number of Loan
Officers already on the DateBase... then add 101... and If you may...
how can I add the letters "LO" infront of the number that is to be
created... Thanks
Here is the Code I tried
Private Sub Personnel_Type_AfterUpdate()
Dim intLO As Interger
Dim intMB As Interger
Dim intLP As Interger
Dim intAS As Interger
If Personnel_Type = "Loan Officer" Then
intLO = DCount("[Personnel_Type]", "Personel Data Table",
"[Personnel_Type]='Loan Officer'")
ID = intLO + 101
End If
If Personnel_Type = "Mortgage Broker" Then
intMB = DCount("[Personnel_Type]", "Personel Data Table",
"[Personnel_Type]='Mortgage Broker'")
ID = intMB + 201
End If
If Personnel_Type = "Loan Processor" Then
intLP = DCount("[Personnel_Type]", "Personel Data Table",
"[Personnel_Type]='Loan Processor'")
ID = intLP + 301
End If
If Personnel_Type = "Admin Staff" Then
intAS = DCount("[Personnel_Type]", "Personel Data Table",
"[Personnel_Type]='Admin Staff'")
ID = intAS + 401
End If