Hi All,
Access 2003.
I am creating a new database to track items on my online shop.
I have an input form to add a new item into the database. What I need help with is creating a unique item number using a autonumber field and a category field.
For example, I have a field named Item Number which is autonumbered so I never have the same number twice (this is my primary key). This field is called "ItemNumber". I have another field called "Category" where the user selects what category the item being added falls under. (i.e Cart, Chair, Computer, Desk, Table...ect).
Here's the tricky part, I want to create a "NewItemNumber" using these two fields with an abbreviation of the Category going in front of the Item Number (autonumber).
I've given some examples of categories but I'm unsure how to assign the abbreviation (i.e Cart = ct, chair = c, desk = d...) to the autonumber since my category list has no abbreviations in them.
Just to further clarify:
Category List:
Cart
Chair
Computer
Desk
Table
Autonumber/item number is 5 (5th item being added to the database) and its a desk.
I'd like the form to generate in the newitemnumber field: "d5"
Another example, autonumber/item number 6 (next item after the desk) and its a computer. So i'd like "cpu6" generated.
I hope this is clear enough for someone to help me out. Thank you in advance
Josh