Solved

How to avoid a Runtime error 3075, Function is not available in query expression when importing a txt file into an Access table?

Posted on 2013-01-27
8
1,391 Views
Last Modified: 2013-01-28
I am developing an application using Access 2003.

I import a txt file into an Access table.

I attached my Access mdb file and the txt file that I am importing.

When I click on the Import button from the interface, I get the following error message:

Runtime error '3075'

Function is not available in query expression
'IIf(isnumeric(clientacct),left(clientacct,3),"")'.

-----------------------------------------------------------
OI-WRS.txt
ReportsDB.mdb
0
Comment
Question by:zimmer9
[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
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 38824931
This is usually a sign that references are broken.

Open a module in design view, click tools/references.

Look for any missing or broken.   If any are, you'll need to fix them.

If none are listed that way, uncheck any un-checked reference (doesn't matter) which.  Close the DB and Access, re-open, and un-check the reference you just checked (it will be the last one).  

This procedure forces of refresh of the references collection.

Make sure your db compiles.  Now try the query.

If it still fails, DAO (if used) will need to be re-registered.  If your not using DAO, then something else is wrong and we can go further.

Jim.
0
 
LVL 26

Expert Comment

by:jerryb30
ID: 38825012
Get this when I open:

Missing Link
0
 

Author Comment

by:zimmer9
ID: 38825140
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

Author Comment

by:zimmer9
ID: 38825141
I updated my Access mdb file to remove a reference to PDFCreator.exe
0
 
LVL 16

Expert Comment

by:kmslogic
ID: 38825226
I think what's happening is that you're encountering null values in your table, and your expressions can't handle that.  Use the nz() function to fixup null values like:

IIf(isnumeric(clientacct),left(clientacct,3),"")

becomes

IIf(isnumeric(nz(clientacct,"")),left(nz(clientacct, ""),3),"")

for numeric columns use

nz(numericcolumn, 0)

in your expressions
0
 
LVL 57
ID: 38826657
<<I updated my Access mdb file to remove a reference to PDFCreator.exe >>

 Does your app compile?

Jim.
0
 
LVL 16

Expert Comment

by:kmslogic
ID: 38827213
I'm curious what the final resolution of this was--did you remove a reference from the vba editor and your app started working?  Which one?
0
 

Author Comment

by:zimmer9
ID: 38827229
I checked on a reference I wasn't using. Then I closed the Access application. Then I reopened the application and unchecked this reference and saved once again and as Jim stated this procedure forces a refresh of the references collection.
0

Featured Post

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Server how to create a DYNAMIC TABLE? 11 51
Can not open the Access Help ? 3 40
Handle Apostrophes in VBA SQL - Part 2 10 48
Import XML File into MS SQL table 3 12
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
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.
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.

751 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