Jim,
This sounds like some form of corruption. I would make a backup of the database and then Repair and Compact. If the errors still occur, create a new database and import all of the objects into it.
Regards,
Duane
Sent: Friday, July 28, 2017 9:03 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [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: Jim Wagner <luvmymelody@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
Tidak ada komentar:
Posting Komentar