Solved

Why won't my Excel formular work in Access?

Posted on 2014-09-23
6
248 Views
Last Modified: 2014-09-29
Confirm Colum equals value and if yes
insert contents from another column eg CS-CV-A-0040 less the A

=IF([Check]="Confined Space",CONCATENATE(LEFT([Confined Space Audit Number,6]),RIGHT([Confined Space Audit Number,4])),"")
This is the data base formular which I cant get to run
=IF(G2="Yes",CONCATENATE(LEFT(B2,6),RIGHT(B2,4)),"")
This is the formular which works in excel
What have I done wrong
0
Comment
Question by:James Clements
[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
6 Comments
 
LVL 14

Expert Comment

by:Don Thomson
ID: 40340707
I would try it with the proper syntax  

IIf («expr», «truepart», «falsepart»)

Which version of Access are your using?

Not the two "I" s


IIF(G2="Yes",LEFT(B2,6)&RIGHT(B2,4)),"")

Also Concatenate is not valid in Access (at least up to Vers 2007
0
 
LVL 85
ID: 40341203
How are you running this in Access? Are you automating Excel from Access and using this, or are you trying to do this directly in Access?
0
 
LVL 37

Expert Comment

by:PatHartman
ID: 40341602
If you don't use embedded spaces and special characters which force you to encase the name in square brackets, you will have fewer opportunities for typos.

=IF([Check]="Confined Space",CONCATENATE(LEFT([Confined Space Audit Number],6),RIGHT([Confined Space Audit Number],4)),"")

You had the ending square brackets in the wrong place.
0
Technology Partners: 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!

 

Author Comment

by:James Clements
ID: 40343219
Still unable to run formular in MS Access 2010
1 [Check] column is "Confine Space" if not leave blank
2 IF true
3 Generate number form column [Confine Space Audit Number} eg CS-CV-A-0040
4 Remove the A from [Confine Space Audit Number} eg CS-CV-0040

This what I am trying to achieve should CONCATENATE work
0
 
LVL 37

Accepted Solution

by:
PatHartman earned 500 total points
ID: 40344240
Still unable to run formular in MS Access 2010
What does that mean?  Are you getting an error message?  What is it?  Are you getting the wrong result?  What are the ALL the inputs and what are you ending up with?  Paste the exact code that is failing.
0
 

Author Closing Comment

by:James Clements
ID: 40351108
I had a spelling mistake in 1 of my columns thanks
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

734 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