I have searched high and low for cogent, well-explained coding to complete a project on which I have spent six months of work.
I stumbled across something on this site that is close to what I seek, but, as is rather typical, I could understand neither the question nor the answer.
I am hopeful that someone in this forum can provide me with suitable guidance.
THE ISSUE
I am working in Access 2003. The database I am preparing collects and organizes information about records for different states of the United States.
Each state has been assigned an independent range of sequential numbers, in order to distinctly identify records entered for a particular state.
For example, the range of numeric values for Texas is 5400 through 5499. The range of numeric values for Alabama is 0300 through 0399.
Each numeric value must include a prefix of "08-" to identify the year of the record.
I want to automate the assignment of these numbers.
For example, if a user desires to create a new record for Texas, I desire a module or macro that (a) programmaticall y assigns the next number in the Texas sequence of assigned numbers; (b) records that number to appropriate tables; and (c) retrieves the number and increments it by one on the next occasion when a user desires to enter a further record for Texas.
I need this exact same programmatic format for each of the fifty states, so the program must be able to differentiate between the correct sequential record identifier for Texas versus Kentucky versus New York versus Alabama, etc.
WHAT I HAVE
I have a rudimentary understanding of Visual Basic, but I cannot find good, solid guidance or explanation concerning the properties I should use to cover this issue, or the appropriate programming logic.
Using If-Then statements, I developed a program that does ratchet a sequence upward (and do it correctly) by one number, but no more.
I believe I need to know how to code the output so it is written to a table, and how to code the program to go fetch the number from that table when the next record is being created. I do not believe DMax is suitable for my needs because there may be multiple simultaneous users of the database, and I understand that DMax would permit undesirable duplication in that context.
Apart from my simple "If-Then" coding, I have nothing more to place the specifics in context. I simply want to be pointed in a good direction to work out the rest myself.
Your kind input is welcome. Thanks.
I stumbled across something on this site that is close to what I seek, but, as is rather typical, I could understand neither the question nor the answer.
I am hopeful that someone in this forum can provide me with suitable guidance.
THE ISSUE
I am working in Access 2003. The database I am preparing collects and organizes information about records for different states of the United States.
Each state has been assigned an independent range of sequential numbers, in order to distinctly identify records entered for a particular state.
For example, the range of numeric values for Texas is 5400 through 5499. The range of numeric values for Alabama is 0300 through 0399.
Each numeric value must include a prefix of "08-" to identify the year of the record.
I want to automate the assignment of these numbers.
For example, if a user desires to create a new record for Texas, I desire a module or macro that (a) programmaticall y assigns the next number in the Texas sequence of assigned numbers; (b) records that number to appropriate tables; and (c) retrieves the number and increments it by one on the next occasion when a user desires to enter a further record for Texas.
I need this exact same programmatic format for each of the fifty states, so the program must be able to differentiate between the correct sequential record identifier for Texas versus Kentucky versus New York versus Alabama, etc.
WHAT I HAVE
I have a rudimentary understanding of Visual Basic, but I cannot find good, solid guidance or explanation concerning the properties I should use to cover this issue, or the appropriate programming logic.
Using If-Then statements, I developed a program that does ratchet a sequence upward (and do it correctly) by one number, but no more.
I believe I need to know how to code the output so it is written to a table, and how to code the program to go fetch the number from that table when the next record is being created. I do not believe DMax is suitable for my needs because there may be multiple simultaneous users of the database, and I understand that DMax would permit undesirable duplication in that context.
Apart from my simple "If-Then" coding, I have nothing more to place the specifics in context. I simply want to be pointed in a good direction to work out the rest myself.
Your kind input is welcome. Thanks.
Comment