Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

SQL Query in MS Access 2000

Posted on 2003-03-18
5
Medium Priority
?
179 Views
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.
0
Comment
Question by:DSaldanaRELTD
5 Comments
 
LVL 11

Expert Comment

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

Thanks!

Joe
0
 

Author Comment

by:DSaldanaRELTD
ID: 8161356
Undefined function 'mid' in expression.

References?  I don't follow.
0
 
LVL 28

Expert Comment

by:TextReport
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
0
 
LVL 17

Accepted Solution

by:
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.
0
 

Author Comment

by:DSaldanaRELTD
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.
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

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

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

579 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