Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Select first line of memo field

Posted on 2007-12-06
4
Medium Priority
?
376 Views
Last Modified: 2013-11-27
I am looking for a way to select only the first line of memo field, quite self explanatory but this is what I am after.

This is the first line
This is the second line
This is the third line

So I would just end up with

This is the first line

Thanks
0
Comment
Question by:daverichardson
[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
  • 2
  • 2
4 Comments
 
LVL 26

Expert Comment

by:jerryb30
ID: 20422488
Select left(memofield, instr(memofield, vbCRLF) as firstLine from yourTable
0
 

Author Comment

by:daverichardson
ID: 20422830
i cant get it to work using vbCRLF, it asks me for the vbCRLF value. If i use the following it puts a carriage return at the end of the line.

SELECT Left([Data]![Description],InStr([Data]![Description],Chr(13) & Chr(10))) AS _Description
FROM Data;
0
 
LVL 26

Accepted Solution

by:
jerryb30 earned 500 total points
ID: 20422857
OK. SELECT Left([Data]![Description],InStr([Data]![Description],Chr(13) & Chr(10))-1) AS _Description
FROM Data;
0
 

Author Closing Comment

by:daverichardson
ID: 31413237
Thanks, i also got it to work with:
SELECT Left([Data]![Description],InStr([Data]![Description],Chr(10))) AS _Description
FROM Data;
0

Featured Post

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!

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

650 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