ms+access+course/ - adding prefix auto number
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum 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

resolvedResolved · Low Priority · Version Standard

replyReply Thu 19 Apr 2007, 10:00Delegate Marc said...

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?

For upcoming training course dates see: Pricing & availability

replyReply Wed 25 Apr 2007, 10:45Trainer Carlos said...

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

 


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard