Annette,
Open the table underlying the form in "design view". Select the "order
no" field. Then at the bottom, under the "General" tab, the last option
is "Indexed". Set this to "Yes (no duplicates)".
This will prevent people from entering duplicate order numbers. If you
have set order number as the primary key, it will automatically set the
"Indexed" property to "Yes (no duplicates)" for you.
If order number is set to the type "AutoNumber", it will automatically
get filled in by the system with the next available order number, which
is automatically unique.
Note that if you delete a record, thus deleting an "order id", the
AutoNumber will not go backwards to choose it again. so if I have orders
1-100, after deleting #50, the next entered order will be 101. If i
deleted #100 the next order would still be 101. AutoNumbers are not reused.
Luke