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  

Return (display) only part of a field



 
 
Thread Tools Display Modes
  #1  
Old March 21st, 2008, 09:48 PM posted to microsoft.public.access.queries
Brett[_2_]
external usenet poster
 
Posts: 25
Default Return (display) only part of a field

Hello,

How would I go about in SQL - Access to display only part of a field
after a specific character?

For example,

In Invoice.Memo, there would be variations on the following:

"SO 3453. Serial # 243"

Basically, I would like to see any data in the memo field AFTER the
period (and this field would only have one period) returned in the
query (not the stuff before it).

Invoice.Memo Returns:
Serial #243

Thanks in advance,
Brett
  #2  
Old March 21st, 2008, 09:55 PM posted to microsoft.public.access.queries
Allen Browne
external usenet poster
 
Posts: 11,706
Default Return (display) only part of a field

In query design view, type an expression like this into the Field row:
Mid([f], Instr([f], ".")+1)

Substitute the name of your memo field for f.

--
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.

"Brett" wrote in message
...
Hello,

How would I go about in SQL - Access to display only part of a field
after a specific character?

For example,

In Invoice.Memo, there would be variations on the following:

"SO 3453. Serial # 243"

Basically, I would like to see any data in the memo field AFTER the
period (and this field would only have one period) returned in the
query (not the stuff before it).

Invoice.Memo Returns:
Serial #243

Thanks in advance,
Brett

  #3  
Old March 21st, 2008, 09:58 PM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Return (display) only part of a field

Take a look at the Mid() and InStr() functions in Access.

Use these to grab off everything after the "." in a query field.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Brett" wrote in message
...
Hello,

How would I go about in SQL - Access to display only part of a field
after a specific character?

For example,

In Invoice.Memo, there would be variations on the following:

"SO 3453. Serial # 243"

Basically, I would like to see any data in the memo field AFTER the
period (and this field would only have one period) returned in the
query (not the stuff before it).

Invoice.Memo Returns:
Serial #243

Thanks in advance,
Brett



 




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 05:30 PM.


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