Re: Compile error on common function, NOT REFERENCE PROBLEM
From: Wayne Morgan (comprev_gothroughthenewsgroup_at_hotmail.com)
Date: 11/04/04
- Next message: Brian: "Share variable between Access & Excel"
- Previous message: Wayne Morgan: "Re: Compile error on common function, NOT REFERENCE PROBLEM"
- In reply to: rgrantz: "Re: Compile error on common function, NOT REFERENCE PROBLEM"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 3 Nov 2004 20:55:35 -0600
I just tied the Mid in a query to make sure and it worked. Here is the SQL
from my test.
SELECT Table10.FirstName, Table10.Middle, Table10.LastName, Table10.Suffix
FROM Table10
WHERE ((Mid([Middle],3,2)="ex"));
Doug brought up a good point about Sandbox mode. Do you have the current
service packs installed for Office, Jet, and MDAC? You don't mention your
operating system, if it is Windows 2000 or Windows XP, you can get the
latest Jet service pack by running Windows Update. If not, go to
http://msdn.microsoft.com/data/downloads/updates/default.aspx.
Will you paste the SQL of your query into a message?
-- Wayne Morgan MS Access MVP "rgrantz" <r_grantz@hotmail.com> wrote in message news:2umr47F2bltflU1@uni-berlin.de... >I attempted to put the expression > > mid([FieldName],3,2)="ZZ" in the criteria cell for [fieldname] in the > Query > Builder (not SQL view). When running the query, I get the immediate > "Compile error. in criteria expression" message. When searching > newsgroups, > I found that the advice most commonly given for this problem was to check > the references in Tools-->References, check for missing ones, remove ones, > add them again, etc. etc. I've tried removing all ones possible (Visual > Basic and DAO Objects say they can't be removed because they are in use), > then adding them back, not adding them back, etc. etc. I have made a new > blank database and imported all objects from the old one, I've compacted > and > repaired. I've also removed and reinstalled Office 2000 Premium and > installed all Office Updates. > > To make sure the visual basic function works, I made a module with: > > Sub midtest() > Dim strtext As String > strtext = "thisisatest" > MsgBox Mid(strtext, 3, 2), vbOKOnly > End Sub > > Running this sub returns a message box with prompt "is", which shows, I > believe, that the mid function operates. > > Is anyone able to put a Mid function in their criteria in the query > builder? > Is it possible that it's simply not something that can be used there?
- Next message: Brian: "Share variable between Access & Excel"
- Previous message: Wayne Morgan: "Re: Compile error on common function, NOT REFERENCE PROBLEM"
- In reply to: rgrantz: "Re: Compile error on common function, NOT REFERENCE PROBLEM"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|