form auto increment

seyf

New member
Local time
Today, 17:47
Joined
Oct 18, 2015
Messages
1
Hello everybody,
I just build a form from a table, the form contains three fields the first field is named "result test" list-type combo 2 choices (success, failure), the second field is named "issue certificate" that must be obligatorily consists of 3 digits (eg 009 or 020 or 142), what i want to do is:
choosing "success" in the field test results, I want the field "issue certificate" is automatically incremented for example from 009-010 or 099-100 knowing incrementing does not start with 000, but by a another figure of my choice.
By choosing "failure" I want the "certificate number" field remains unchanged (without INCREMENT)
Is there a solution to solve this problem, I need my work ds
I would appreciate if there is a solution without changing the code vba
thank you in advance
 
Hello and welcome to the forum.

If I had to manufacture a number like KLEM-123-0-7641, and parts of it might increment, or parts of it might be drawn from various other sources, then I would not store it complete. Rather, I would store the parts that need to increment as numbers so it's easy to do math on them. Then I would assemble this number in a query that draws from the fields that hold the source data.

If you store it complete, then you have to dis-assemble it, increment a part of it, and then re-assemble it, which is a waste of effort.

People seem to love these composite numbers. In a database they are a make work project.

Does that make sense?
 

Users who are viewing this thread

Back
Top Bottom