mpden32
asked on
Microsoft Access AutoNumber Help
I have a form called Orders which contains an AutoNumber field.
Here is what i am trying to accomplish.
1. Put in an order and generate the order number at the time of saving the record and display it in a message box.
Whats I am currently doing is using autonumber but my issue is when i populate the first field on the form it generates the number. If a person closes the form before completing the record then i have a record with bogus data. Is the only way to get around this is to make every field I need required on the table. If so is there a way to make the error message very simple if the field is not populated when the window is closed rather then giving the long error mesage a user might not understand?
Also I know you can only have one autonumber field on a table. Can you please offer another way to add an additional auto number / text field. This would be for a PO to be autogenerated. exa LA1000.
Here is what i am trying to accomplish.
1. Put in an order and generate the order number at the time of saving the record and display it in a message box.
Whats I am currently doing is using autonumber but my issue is when i populate the first field on the form it generates the number. If a person closes the form before completing the record then i have a record with bogus data. Is the only way to get around this is to make every field I need required on the table. If so is there a way to make the error message very simple if the field is not populated when the window is closed rather then giving the long error mesage a user might not understand?
Also I know you can only have one autonumber field on a table. Can you please offer another way to add an additional auto number / text field. This would be for a PO to be autogenerated. exa LA1000.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
To create a PO, you can use the autonumber on this field because on the first field you can remove the autonumber and use a solution like I gave you.
jppinto