Creating my own ID

mhemat

New Member
Joined
Apr 14, 2011
Messages
30
Hi everyone, I have few questions and I would post them as I go along.


1- How to create my own ID numbering scheme (Key) that starts with 10020000.

2- I have 3 fields that is named "Bed", "Room", and "Location". I want to be able to when I insert a Bed number, the Room number and Location automatically appeare in their fields. For example: Bed number 1 is in room 2 and located in Robinson Hall (Location).

Thank you very much for your help.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
You would have to write a function or use a query to get the max number and add one ... . Of course you will put the first ID in yourself for 10020000. After that, when you need to insert a record you will first query the table for the max ID, then add one to it and use that number as your next ID. This could be done with a DMAX() function, or a query. Some ideas were bounced around here in a tangentially related post: http://www.mrexcel.com/forum/showthread.php?t=555653
 
Upvote 0
You can also use an AutoNumber field.
Create a dummy table with a Number field, and put in a number 1 less than your desired starting value.
Create an Append query and push this value to your main table, into the main ID field.
Run the query, then open the table and delete the dummy record. The next record you enter will start with the desired ID. And because it's an AutoNumber, it should increment from there.

Denis
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top