|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here! |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
I am using MS Access to create an inventory database so I can run queries to do product counts/analysis/etc... The best way to make tables work together is to use a key. I would like to create a key code for my inventory that is intuitive so I have come up with the following:
Examples: ITEM NAME: BAMBUSA OLDHAMII ITEM SIZE: #15 CODE: BAMOLD15 ITEM NAME: PHYLLOSTACHYS NIGRA ITEM SIZE: #05 CODE: PHYNIG05 My question is: Is there a way to have Access automatically generate this code based on the ITEM NAME and ITEM SIZE fields? Please let me know if this is possible. Thanks, Rich
__________________
Me |
|
||||
|
Quote:
Anyone know where there is a tutorial explaining this? Thanks, Rich
__________________
Me |
|
||||
|
Search Access Help for:
"Extract part of existing text values using a calculated field" Result: Extract part of existing text values using a calculated field In query Design view, create a query. Add the tables whose records you want to use. To find values in part of a field, use the Left, Right, or Mid function in an expression in an empty cell in the Field row in the query design grid. The syntax for these functions is: Left(stringexpr,n) Right(stringexpr,n) Mid(stringexpr,start,n) The stringexpr argument can be either a field name (enclosed in brackets) or a text expression; n is the number of characters you want to extract; start is the position of the first character you want to extract. The following table shows examples of these functions. If the value in Part ID is This expression Returns BA-7893-R12 Left([PartID],2) BA BA-7893-R12 Right([PartID],3) R12 BA-7893-R12 Mid([PartID],4,4) 7893 Add any other fields you want to include in the query to the query design grid. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |