Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

remove character from text

 
   Windows Help (Home) -> Microsoft Access RSS
Next:  Duplicating data  
Author Message
Simon

External


Since: Dec 1, 2008
Posts: 6



(Msg. 1) Posted: Wed Dec 03, 2008 2:25 pm
Post subject: remove character from text
Archived from groups: microsoft>public>access (more info?)

What would the VB code be to
if i type the following text into txtbox1 'GHY1048573850001' i when i
exit it i would like it to remove the first 3 character and last 4
character and dispay it it in txtBox2

So the text will look like '104857385'


Thanks

 >> Stay informed about: remove character from text 
Back to top
Login to vote
Ken Sheridan

External


Since: Nov 28, 2008
Posts: 17



(Msg. 2) Posted: Wed Dec 03, 2008 2:45 pm
Post subject: RE: remove character from text
Archived from groups: per prev. post (more info?)

Try this as the ControlSource of txtBox2:

=Mid([txtbox1],4,Len([txtbox1])-7)

The Mid argument returns a substring from the value of its first argument,
starting at the position of its second argument and the length of its third
augment. In this case the third argument gets the length by subtracting 7
(4+3) from the full length of the string as returned by the Len function.

Ken Sheridan
Stafford, England

"Simon" wrote:

> What would the VB code be to
> if i type the following text into txtbox1 'GHY1048573850001' i when i
> exit it i would like it to remove the first 3 character and last 4
> character and dispay it it in txtBox2
>
> So the text will look like '104857385'
>
>
> Thanks
>

 >> Stay informed about: remove character from text 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Remove ''Enter Parameter Value'' - I deleted like 10 field names in my Employees table. When I want to go in my Employees form, ''Enter Parameter Value'' pops up for each field names I deleted, so 10 times. I usually go in the desgin view of that form, in the record source and delete..

Remove Info From "Open Recent Database" on Access Opening .. - I'm a new Access user. I've created databases which were wrong. I've remade them and now have a list of erroneous items on the "Open Recent Database" section of the "Getting Started with Microsoft Office Access" page. I can't fi...

Color Text Box - I have a check box and a text box. How to I make it so when my check box is checked (or=Yes), my text box is yellow? Thank you very much! -Scott Channell

Show in a lebel or text M^3 - I want in the report labels and texts as Post Scripts Cubic Meters as M^3. We can do in MS Excel. Is any way to use in Access

How to write text file - Hi, How to wrote a field (memo) content to a text file. Before write to text file I want to remove the <div> ,</div>. How to do that? SF
   Windows Help (Home) -> Microsoft Access All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]