Hi
I have create a Table named as "Student", with 3 fields: ID, stdName, and stdField.
I also have created a Query named as "stdQuery". This query return the stdField of a given stdName . Using the SQL language, it can be written as:
Select stdField from Student where stdName = 'John' (for example)
In the following, I have created a Form named as "studentField". To create this form, I have used "Form wizard" to map the form to "stdQuery". Up to now, everything is fine.
In the following, I have defined a second form, namely "studentName". This form contains a comboBox which presents the names of the students. I want that when choosing the name of a student in the comboBox, its field is presented in "studentField". Therefore, I have written the following code in the on_click function of the comboBox of "studentName":
DoCmd.OpenForm "studentField", , , "stdName = " & combo0.selText
But when selecting a name in "studentName", it asks for a stdName as if I don't pass it to "studentField".
Cloud anyone please help me about the problem?