Solved

Mid  and Left Command Follow up question:

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
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…
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.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

920 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

12 Experts available now in Live!

Get 1:1 Help Now