?
Solved

exclude last 4 characters from combo value

Posted on 2005-03-03
10
Medium Priority
?
249 Views
Last Modified: 2012-05-05
I want to get the text in a combo box into a variable after excluding last 4 digits of the combo value.

eg.
combo8.text = myproject.mdb

myvalue = myproject                   ---> only myproject appears and all rest is gone.

Please help
Thank you.
0
Comment
Question by:Aiysha
[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
  • 6
  • 4
10 Comments
 
LVL 4

Expert Comment

by:abbdan
ID: 13451505
combo8.text = left("myproject.mdb", Len("myproject.mdb")-4)
0
 
LVL 66

Assisted Solution

by:Jim Horn
Jim Horn earned 1000 total points
ID: 13451517
Try this...

myvalue= Left(combo8.Value, Len(combo8.Value)-4))
0
 
LVL 4

Accepted Solution

by:
abbdan earned 1000 total points
ID: 13451538
or myvalue = left(combo8.text, len(combo8.text)-4)

hope combo8 isn't a combo box because I think you have to manipulate the value instead of the text if thats the case.

myvalue = left(combo8.value, len(combo8.value)-4)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 66

Expert Comment

by:Jim Horn
ID: 13451828
Not to be rude, but why the split?  Looks like I nailed it in an earlier post..
0
 
LVL 4

Expert Comment

by:abbdan
ID: 13452790
Not to be rude but there's no way I could have typed the accepted answer in 2 seconds which is the difference between your post and mine.  Not to mention I had the right idea but we both didn't have all the information.
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 13452807
I wasn't commenting on the similarity of our comments, as you are correct it is well withing normal refresh.  I was commenting on the split.
0
 
LVL 4

Expert Comment

by:abbdan
ID: 13452857
I thought it nice of him to include you as a recipient of points even though all you did was clearify my idea without even knowing if the combo box was being used.  I put him on track and you gave specifics that assited.  Looks quite fair to me.
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 13452925
Your original post is hard-coding "myproject.mdb", and not a value in a combo box.
0
 
LVL 4

Expert Comment

by:abbdan
ID: 13452976
yep.. but it gets the point across as to how everything should work.  It was a simple matter of replacing values.  I answered his origional question with something that was like what he should use.  I'm sure you've seen many times when an idea that triggers a solution is adiquate??
0
 
LVL 4

Expert Comment

by:abbdan
ID: 13452986
Probably would have made it clearer to you had he accepted the origional post.  I understood why he did what was done.
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Introduction to Processes

770 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