S
Shane G. Brodie
Intersting query problem
I have a relaively simple, if long query which operates from within an MS
Access 2000 application where the front-end database contains links to the
backend database residing on a file server. All queries used in the
application are defined on the front-end, all tables are on the backend.
One particular query runs fine if defined and executed from the back-end
database. The same query, when run from the front-end database fails with
the following error:
"Function is not available in query expression'[CompanyName] & Chr(13) &
[Address1] & " " & [Address2] & Chr(13) & [City] & ", " & [Province] & " " &
[PostalCode]'.
Here is the entire query:
PARAMETERS [ParamContractID] Long;
SELECT tblCompany.CompanyName, [CompanyName] & Chr(13) & [Address1] & " " &
[Address2] & Chr(13) & [City] & ", " & [Province] & " " & [PostalCode] AS
CompanyNameAddress, [CompanyName] & Chr(13) & [Address1] & Chr(13) &
[Address2] & Chr(13) & [City] & ", " & [Province] & " " & [PostalCode] AS
CompanyAddress1pl, tblCompany.Address1, tblCompany.Address2,
tblCompany.City, tblCompany.Province, tblCompany.PostalCode,
tblCompany.ContactName, [ContactName] & " - " & [CompanyName] & " - " &
[Address1] & " " & [Address2] & " " & [City] & ", " & [Province] & " " &
[PostalCode] AS CompanyContact, tblContractCompany.ContractID,
tblContractCompany.IncInContract, tblContractCompany.PrimaryContact
FROM tblContractCompany INNER JOIN tblCompany ON
tblContractCompany.CompanyID = tblCompany.CompanyID
WHERE (((tblContractCompany.ContractID)=[ParamContractID]) AND
((tblContractCompany.PrimaryContact)=True));
Be kind ... I didn't write the app ... I just have to fix it ...
--
Shane Brodie
IT Consultant
c/o MANITOBA FILM & SOUND
333-93 Lombard Avenue
Winnipeg MB R3B 1B3
tel 204-947-2040
fax 204-956-5261
website: http://www.mbfilmsound.mb.ca
e-mail: (e-mail address removed)
I have a relaively simple, if long query which operates from within an MS
Access 2000 application where the front-end database contains links to the
backend database residing on a file server. All queries used in the
application are defined on the front-end, all tables are on the backend.
One particular query runs fine if defined and executed from the back-end
database. The same query, when run from the front-end database fails with
the following error:
"Function is not available in query expression'[CompanyName] & Chr(13) &
[Address1] & " " & [Address2] & Chr(13) & [City] & ", " & [Province] & " " &
[PostalCode]'.
Here is the entire query:
PARAMETERS [ParamContractID] Long;
SELECT tblCompany.CompanyName, [CompanyName] & Chr(13) & [Address1] & " " &
[Address2] & Chr(13) & [City] & ", " & [Province] & " " & [PostalCode] AS
CompanyNameAddress, [CompanyName] & Chr(13) & [Address1] & Chr(13) &
[Address2] & Chr(13) & [City] & ", " & [Province] & " " & [PostalCode] AS
CompanyAddress1pl, tblCompany.Address1, tblCompany.Address2,
tblCompany.City, tblCompany.Province, tblCompany.PostalCode,
tblCompany.ContactName, [ContactName] & " - " & [CompanyName] & " - " &
[Address1] & " " & [Address2] & " " & [City] & ", " & [Province] & " " &
[PostalCode] AS CompanyContact, tblContractCompany.ContractID,
tblContractCompany.IncInContract, tblContractCompany.PrimaryContact
FROM tblContractCompany INNER JOIN tblCompany ON
tblContractCompany.CompanyID = tblCompany.CompanyID
WHERE (((tblContractCompany.ContractID)=[ParamContractID]) AND
((tblContractCompany.PrimaryContact)=True));
Be kind ... I didn't write the app ... I just have to fix it ...
--
Shane Brodie
IT Consultant
c/o MANITOBA FILM & SOUND
333-93 Lombard Avenue
Winnipeg MB R3B 1B3
tel 204-947-2040
fax 204-956-5261
website: http://www.mbfilmsound.mb.ca
e-mail: (e-mail address removed)