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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Access

Status
Not open for further replies.

NeoGreen

IS-IT--Management
Aug 19, 2006
39
0
0
US
Hello,
I have a question, I was wondering if this was possible. I have items that carry serial numbers. Within the Serial number it has the year the item was made. What I want to do is create a query that I can run, in which all items created in a certain year are shown. Here is an example of a serial number: FSB0612218421, the 06 is the year the item was created. Is there a way Access can distinguish or separate the items even though the year is fourth and fifth digit from the right? I hope I am wording this correctly.
 
To select items for a specific year
Code:
Where Mid([SerialNumber],4,2) = '06'

To report by year
Code:
Select Mid([SerialNumber],4,2) As MfgYear, ...

From ...

Order By 1
 
Certainly it can. You should be able to use the LEFT function, and the RIGHT function to get this information.
Just take the LEFT 2 digits of the RIGHT (LEN -3) and that should get it for you. Please let me know if this is not clear.
 
Awesome, thanks for the information. I'll try it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top