Solved

Mid  and Left Command Follow up question:

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

737 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