Solved

Select first line of memo field

Posted on 2007-12-06
4
315 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 125 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

726 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