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,354 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

Back Up Your Microsoft Windows Server®

Back up 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

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…
If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

840 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