Solved

Mid  and Left Command Follow up question:

Posted on 2007-11-18
3
650 Views
Last Modified: 2012-05-05
I have a few commands......Mid and A Left that I need to all come together as one field....  See my text below

Left([Transaction Description],12) & "-" & [Transaction Description],Mid([Transaction Description],InStr([Transaction Description]," ")+1,10) & "-" & Left([Ref1_Ref],6) AS JournalRef

When I have this in access in sql view and then run it....access changes it to

Left([Transaction Description],12) & "-" & [Transaction Description] AS Expr1, Mid([Transaction Description],InStr([Transaction Description]," ")+1,10) & "-" & Left([Ref1_Ref],6) AS JournalRef

I need all three to be together as the JournalRef and not two seperate fields....

Thanks,

Bob
0
Comment
Question by:vmrfadmin
  • 2
3 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 20309295
try change the comma to { & }
------------------------------------------------------------------------------------v
Left([Transaction Description],12) & "-" & [Transaction Description],Mid([Transaction Description],InStr([Transaction Description]," ")+1,10) & "-" & Left([Ref1_Ref],6) AS JournalRef

to


Left([Transaction Description],12) & "-" & [Transaction Description] & Mid([Transaction Description],InStr([Transaction Description]," ")+1,10) & "-" & Left([Ref1_Ref],6) AS JournalRef
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 20309298
post sample data and the result you want to see
0
 

Author Closing Comment

by:vmrfadmin
ID: 31409841
I sometimes miss the really easy syntax issues..............I had to remove a misplaced fieldname [Transaction Description].

I realized my mistake when you showed the example ......

Here is what I really needed.........

Left([Transaction Description],12) & "-" & Mid([Transaction Description],InStr([Transaction Description]," ")+1,10) & "-" & Left([Ref1_Ref],6) AS JournalRef


Thanks so much for your help........I really appreciate it!!!!

Bob
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server views 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 Access…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now