Solved

Mid  and Left Command Follow up question:

Posted on 2007-11-18
3
667 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
[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
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

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
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…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
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.

729 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