Solved

acccess query split text to ...

Posted on 2014-09-29
11
487 Views
1 Endorsement
Last Modified: 2014-10-31
Hello all,

There is column like this in a table :

Item |Type
I1    | 78 lbs

Now I want to do query that splits the above type to two display  columns like this:
Item | size | size denomination
I1  |  78    | lbs
1
Comment
Question by:Rayne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
11 Comments
 

Author Comment

by:Rayne
ID: 40351159
thank you
0
 
LVL 12

Accepted Solution

by:
danishani earned 500 total points
ID: 40351177
Try this in a Query:
size: Left([YourFieldName],InStr(1,[YourFieldName]," ")-1)
size denomination: Right(Trim([YourFieldName]),Len(Trim([YourFieldName]))-InStr(1, _
 [YourFieldName]," "))

Make sure you change [YourFieldName] into the actual column name you want to change, for example [Type] if that's the column name.
0
 

Author Comment

by:Rayne
ID: 40351276
This piece is not working
InStr(1,[YourFieldName]," ")-1)

returning function error
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:Rayne
ID: 40351294
it works :)
thank you
0
 

Author Comment

by:Rayne
ID: 40351335
I am getting #Func! as error for some rows for size. How to check it> do you know...
0
 

Author Comment

by:Rayne
ID: 40351482
ding dong - any solution? do i need to re-open this question? for this
0
 
LVL 12

Expert Comment

by:danishani
ID: 40351501
Hi Rayne,
Please post the value which give you the error.
I guess some of the content does not match the logic to split the fields correctly.

Thanks,
Daniel
0
 

Author Comment

by:Rayne
ID: 40351514
thank danishani, I sorted it. Used iif
Cheers :)
0
 
LVL 12

Expert Comment

by:danishani
ID: 40351524
Perfect glad you got it working! :)
0
 

Expert Comment

by:Love Chopra
ID: 40415201
Its working for me too. Thx
0
 

Author Comment

by:Rayne
ID: 40415405
@love Chopra
this is my fevorite life saver forum. Saved me several nights of coffee several times
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question