Hi, My first post
I am developing a form in Access which enables a student to be searched or added to the database. The form I created contians two sub forms - one of the queries which the form is based on takes three criteria from other form fields which are as follows:
The query and the form work fine on their own, however, I want to add this form as a sub form in another form. When I attempt to do this I get prompted for the query criteria and access refuses to pick up the values from the fields. Does anyone have any idea why?

I am developing a form in Access which enables a student to be searched or added to the database. The form I created contians two sub forms - one of the queries which the form is based on takes three criteria from other form fields which are as follows:
Code:
[StudentId] = [Forms]![studentselect]![txtStudentId]
LCase([Surname]) = LCase([Forms]![studentselect]![txtsurname])
LCase(Left([FirstName], 1)) = IIf([Forms]![studentselect]![txtInitial] Is Not Null,[Forms]![studentselect]![txtInitial],LCase(Left([FirstName],1)))
The query and the form work fine on their own, however, I want to add this form as a sub form in another form. When I attempt to do this I get prompted for the query criteria and access refuses to pick up the values from the fields. Does anyone have any idea why?