Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using vbcr in query 1

Status
Not open for further replies.

jimdevon

IS-IT--Management
Oct 14, 2002
25
US
I have a query which I use as a recordset for a report. In this report, there is a text field where the report needs to return only the items on the first line (ie. everything left of the first carriage return). I had created a field using x:= Left([fieldname],InStr(1,[fieldname]," ")) as a temporary fix and told the user to add a double space at the end of the first line for each record (there were only a few). This works, but I would like to use something on the order of x:= Left([fieldname],InStr(1,[fieldname],vbcr)), but I do not know how to refer to vbobjects in a query. I expect that there is a better way to do this in a function, but the process eludes me. Thanks in advance for any help. Jim
 
vbCr is not supported outside of a module. You can use Chr(13) to search for a carriage return.

Duane
MS Access MVP
 
Thanks, Duane. Worked perfectly. Where can I find a list of such objects?
 
Search Help (while in a module) for "Constants". They seem to be divided amount various categories.

Duane
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top