SQL Query in MS Access 2000

Posted on 2003-03-18
Medium Priority
Last Modified: 2008-03-10
INSERT INTO [Gantt Data (Full Set)] ( [Business Unit], Duration, [Project Name] )
SELECT [Gantt Data (Full Set)].[Business Unit], Sum([Gantt Data (Full Set)].Duration) AS TOTAL_PER_TOWN, Mid([Gantt Data (Full Set)].[Project Name],1,2) AS TOWN_CODE
FROM [Gantt Data (Full Set)]
GROUP BY [Gantt Data (Full Set)].[Business Unit], Mid([Gantt Data (Full Set)].[Project Name],1,2);

The above query worked yesterday.  Now the Mid function is erroring out within MS Access.  Nothing has changed between now and then.  I guess I'm trying to figure out if it was a flux that it worked yesterday or what has errored out.
Question by:DSaldanaRELTD
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
LVL 11

Expert Comment

ID: 8161159
What is the error message? Have you checked your references to make sure there aren't any missing?



Author Comment

ID: 8161356
Undefined function 'mid' in expression.

References?  I don't follow.
LVL 28

Expert Comment

ID: 8161638
Access has a problem when the VBA modelue in memory gets corrupt and you need to quit Access and reload and this error may go away.

If it doesn't then go to a Module and select the Tools Menu, References and see if any of the References are prefixed with the word MISSING:

Cheers, Andrew
LVL 17

Accepted Solution

Natchiket earned 200 total points
ID: 8161641
try this:
open a module in design view
click on tools, references
check if any of the reference libraries are listed as MISSING.
Even if they aren't tick the next un-ticked box in the list, then click on ok.  Click on tools references again and remove the tick you just added (really) and have another go.

Author Comment

ID: 8161676
that was it on the nose.  There was a missing, non-relevant dll, that I guess Access was thinking Mid was located in it.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

762 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