Dear All,
I have a problem that started yesterday.
I have had these functions and they have worked for the last 8-10 months, but yesterday I got the following error, after clicking my Run Report or Run Query Button.
It might be a references problem, are there right and wrong references to use in VB?
Please help this is so frustrating
Thank you
Just in case the code above bunches when I submit:
[blue]Function[/blue] QueryExists(stDocName [blue]As String[/blue]) [blue]As BooleanOn
Error Resume Next [/blue]
QueryExists = (CurrentDb.QueryDefs(stDocName).NAME = stDocName)
[blue]End Function[/blue]
[blue]Function[/blue] ReportExists(stDocName [blue]As String[/blue])[blue] As BooleanOn
Error Resume Next[/blue]
ReportExists = (CurrentProject.AllReports(stDocName).NAME = stDocName)
[blue]End Function[/blue]
Thank you,
Kind regards
Triacona
I have a problem that started yesterday.
I have had these functions and they have worked for the last 8-10 months, but yesterday I got the following error, after clicking my Run Report or Run Query Button.
The Functions are:Error 2467 said:Run-time error '2467' The Expression you entered refers to an object that is closed or doesn't exist
Code:
[blue]Function[/blue] QueryExists(stDocName [blue]As String[/blue]) [blue]As BooleanOn
Error Resume Next [/blue]
QueryExists = (CurrentDb.QueryDefs(stDocName).NAME = stDocName)
[blue]End Function[/blue]
[blue]Function[/blue] ReportExists(stDocName [blue]As String[/blue])[blue] As BooleanOn
Error Resume Next[/blue]
ReportExists = (CurrentProject.AllReports(stDocName).NAME = stDocName)
[blue]End Function[/blue]
Please help this is so frustrating
Thank you
Just in case the code above bunches when I submit:
[blue]Function[/blue] QueryExists(stDocName [blue]As String[/blue]) [blue]As BooleanOn
Error Resume Next [/blue]
QueryExists = (CurrentDb.QueryDefs(stDocName).NAME = stDocName)
[blue]End Function[/blue]
[blue]Function[/blue] ReportExists(stDocName [blue]As String[/blue])[blue] As BooleanOn
Error Resume Next[/blue]
ReportExists = (CurrentProject.AllReports(stDocName).NAME = stDocName)
[blue]End Function[/blue]
Thank you,
Kind regards
Triacona