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,369 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
  • 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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

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

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
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.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

685 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