Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access database 'autolookup' Help

Status
Not open for further replies.

zerod

Technical User
Feb 1, 2002
13
CA
I want to create multiple records of 2 types of parts in Microsoft Access. Each entry will be Autonumbered. Then I want to add either 10000 or 20000 to the Autonumber number so that each part has a unique number, but that number still tells you which type of part it is. I want this all to be done automatically once the name of the type of part is entered.

1. Is this possible?
2. How do I do it in a table?
3. How do I do it in a form?

Thanks
 
Sure, this is possible.

Set up a table with:

numSmallPartID Autonumber
txtPartType Text
txtPartName Text

Then, in a query, set up a new field like:

numBigPartID: Iif(txPartType = "Type 1",10000 + numSmallPartID, 20000 + numSmallPartID)

Use this query as your reference for all forms and reports. You can reference the numBigPartID when trying to find your parts.

By the way, there are several Access forums at this site.

Hope this helps.

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top