98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access Training and help » ms+access+course/ - Adding a prefix to an auto number
ms+access+course/ - Adding a prefix to an auto number
Resolved · Low Priority · Version Standard
Marc has attended:
Access Intermediate course
Access VBA course
Access Advanced course
Adding a prefix to an auto number
i need to add a prefix depending on a selection made from a combo box in a form how would i go about this?
RE: adding a prefix to an auto number
Marc
To Add the same prefix to an Autonumber:
Create a new table in design view, including your "RecordID" auto number field.
You will need to add the specific format you require in the Format property of the auto number field:
eg "REC"000
NB. The quotation marks must be added around the string value you wish to include. The 000 (zero's) indicate the value that will follow the textual prefix.
If the prefix changes depending on the value selected in the combo box it may need a bit of VBA code (An IF loop) to change the field's format each time a number is entered.
Regards
Carlos
Carlos
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Combo box for finding recordsYou can use a combo box in a form to look up a record. If you place the comb box in the Form header, by then selcting they a field type from the drop down loist, you will see the record for it |