I have a form with 3 things for my users to fill in:
a textbox called
ProjectNametwo ActiveX control objects (Microsoft Time and Date picker Control 6.0) called
ProjStartDateandProjEndDaterespectively
After my users have entered either of the above, they can click on a button that will call requery on a list box object in the form which will display the filtered results.
I have set the Row Source Type of the listbox to be "Table/Query" and its Row Source to be the below SQL query:
SELECT p.Title
FROM Project AS p
WHERE
p.Title = [Forms]![Search by project]![ProjectName]
OR (p.StartDate <= [Forms]![Search by project]![ProjStartDate]
AND p.EndDate >= [Forms]![Search by project]![ProjEndDate])
ORDER BY
p.ProjectId DESC;
However, every time I enter the form, it will prompt me with a pop up box asking me for a parameter called Forms!Search by project!ProjectName , Forms!Search by project!ProjStartDate and Forms!Search by project!ProjEndDate . If I enter the parameter for, lets say project name correctly, the list box will display the correct filter results.
Furthermore, even if I enter the correct keyword in the ProjectName textbox and requery, the parameter pop up box will still occur. Do anyone knows how to solve this issue? Thanks a lot in advance!