A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Delete characters up to a space



 
 
Thread Tools Display Modes
  #1  
Old July 15th, 2008, 01:55 PM posted to microsoft.public.access.queries
David#
external usenet poster
 
Posts: 15
Default Delete characters up to a space

I have a field that I need to delete all characteras up to and including the
first space. The first space may occur anywhere from the second to the
eighth or ninth character position. Can this be accomplished??
  #2  
Old July 15th, 2008, 03:03 PM posted to microsoft.public.access.queries
Allen Browne
external usenet poster
 
Posts: 11,706
Default Delete characters up to a space

1. Backup the database in case something goes wrong.

2. In query design view, type an expression like this in the Field row:
Trim(Mid([F1], Instr([F1], " ") + 1))
replacing F1 with the name of your field.

3. Check that this gives the desired results.

4. If so, change the query to an Update query.
(Update on Query menu.)
Access adds an Update row to the query grid.

5. Move the expression into the Update row under your field.

6. Run the query.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"David#" wrote in message
...
I have a field that I need to delete all characteras up to and including
the
first space. The first space may occur anywhere from the second to the
eighth or ninth character position. Can this be accomplished??


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:04 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.