Jumat, 28 Juli 2017

[MS_AccessPros] Strange Errors when running query with a public function

 

Hello all,


This morning I have come across 2 strange errors that only happens on 2 different databases for a process that is on 20 other databases and work correctly.


I am not sure why these two databases are causing the issues.


I would appreciate any assistance with this crazy problem.


Thank You


Jim Wagner




I have a public function


Option Compare Database


'SQL Database statements


Public Function GetSQL(strQueryName As String)
'GetSQL = CurrentDb.QueryDefs(strQueryName).SQL
End Function


Then a query

SELECT msysObjects.Name, GetSQL([Name]) AS [SQL], Left([SQL],(InStr(1,[SQL]," ")-1)) AS [Query Type], "Drivers License Database" AS [Database Name]
FROM msysObjects
WHERE (((msysObjects.Name) Not Like '~*') AND ((msysObjects.type)=5));


Database 1


The error for this database

is a run-time error 3265

Item not found in this collection.


_________________________________________


Database 2

The next database has the same public function and the same query


but the error is different


it is  run-time error '3258'

The SQL statement could not be executed because it contains  ambiguous joins. To force one of the joins to be performed first, create a separate query that performs the first join and then include the query in your SQL statement.


It does not let me out of the error.







__._,_.___

Posted by: luvmymelody@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar