access database deleting

  • Thread starter Thread starter jetam
  • Start date Start date
J

jetam

how to remove the first word "only" in a cell. example: and also who ever
sends me an e-mail is my friends so send. I would like to remove the first
word "and". the other issue is that not all the cells begin with the same
word. Is this possible to do. I am new to this so i could use the help
 
The key to this is finding a specific character that can be used to identify
the end of the first word; i.e, the space. So you use the InStr function to
find the numerical position of the space in the string (phrase in the field
(not cell)). Then, you keep all of the characters to the right of the space.
You determine how many characters to keep by subtracting the position of the
space from the Length (Len) of the string.
So let's say the fieldname containing your phrase is "txtStuff".
The following expression in the Control Source of a text box will remove the
first word of whatever phrase is in the field txtStuff:
=right([txtStuff],Len([txtStuff])-InStr(1,[txtStuff]," "))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top