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

Author Comment

by:zimmer9
ID: 38825141
I updated my Access mdb file to remove a reference to PDFCreator.exe
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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.

707 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

15 Experts available now in Live!

Get 1:1 Help Now