I have an In-Line Function in an Access 2003 database attached to a SQL Server. I am trying to set up a Form to enter a parameter for the function. Everything works fine mechanically with the form (it opens the function) but it does not retrieve any records.
I believe the problem might be related to the Criteria field in the function. According to non-SQL directions for creating a parameter in a form, I enter [Forms]![Name of Form]![Field] in the Criteria. However, Access adds an = sign and ' ' marks. My SQL for the criteria looks like:
ALTER FUNCTION DeansOffice.[Check PT]
()
RETURNS TABLE
AS
RETURN ( SELECT TOP 100 PERCENT Term, PTLastName, PTFirstName, ACC, CourseNum, Section, Salary
FROM dbo.PTFaculty
WHERE (Term = '[Forms]![PT Faculty by Dept and Term]![Term]') )
What am I doing wrong?
Thks.
Mary
I believe the problem might be related to the Criteria field in the function. According to non-SQL directions for creating a parameter in a form, I enter [Forms]![Name of Form]![Field] in the Criteria. However, Access adds an = sign and ' ' marks. My SQL for the criteria looks like:
ALTER FUNCTION DeansOffice.[Check PT]
()
RETURNS TABLE
AS
RETURN ( SELECT TOP 100 PERCENT Term, PTLastName, PTFirstName, ACC, CourseNum, Section, Salary
FROM dbo.PTFaculty
WHERE (Term = '[Forms]![PT Faculty by Dept and Term]![Term]') )
What am I doing wrong?
Thks.
Mary