Error # 3219

L

Len

I am upsizing an Access application to use SQL Server linked tables and
experiencing the following situation. When a parameter query is opened in VBA
the following error occurred: 1 Error # 3219 Invalid operation. When I tried
to open the same query manually the following error occurred: Unknown Jet
error.

The query defined below

SELECT Profile.* FROM Profile WHERE (((Profile.CompanyID)=GetCompanyID()))
WITH OWNERACCESS OPTION;

Utilizes the following function:

Public Function GetCompanyID() As String
GetCompanyID = globCompanyID ‘**** global variable
End Function

What can be wrong here? Thanks.
 
Top