Solved

Mid  and Left Command Follow up question:

Posted on 2007-11-18
3
661 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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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 120

Expert Comment

by:Rey Obrero (Capricorn1)
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

830 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