betachristopher
Programmer
I am creating an access database that will be used to create unique account numbers. This is all being done with local tables, no linking to tables on a server. This is a single user database. I am not familiar with VBA although I'm guessing I will need to be to do this.
In the data entry form that I have made, there are two combo boxes, each linking to a different table. One table contains Regions (example: Midwest), and the other table contains Client Types (example: Commercial). Each record in these tables has a unique ID (Midwest = 1, Commercial = 1). I am using both the unique ID and the Description columns in the combo boxes. When a new record is created in this form it is added to an Account table. What I I need your help with is creating a unique account number that uses the IDs from the Region and Client Type tables as the first two numbers in the account number. Example, if Midwest(1) is chosen as the region and Commercial(1) as the client type, I want the account number to be 110001. If Midwest(1) is chosen as the region and Private(2) is chosen as the client type, the account number should be 120001. How can I use autonum or something similar that creates this number? Thank you for your help.
In the data entry form that I have made, there are two combo boxes, each linking to a different table. One table contains Regions (example: Midwest), and the other table contains Client Types (example: Commercial). Each record in these tables has a unique ID (Midwest = 1, Commercial = 1). I am using both the unique ID and the Description columns in the combo boxes. When a new record is created in this form it is added to an Account table. What I I need your help with is creating a unique account number that uses the IDs from the Region and Client Type tables as the first two numbers in the account number. Example, if Midwest(1) is chosen as the region and Commercial(1) as the client type, I want the account number to be 110001. If Midwest(1) is chosen as the region and Private(2) is chosen as the client type, the account number should be 120001. How can I use autonum or something similar that creates this number? Thank you for your help.