Thread: Passing parameter between forms
11-10-13, 14:45 #1Registered User
- Join Date
- Nov 2013
Unanswered: Passing parameter between forms
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?
11-11-13, 00:26 #2Moderator
Provided Answers: 19
- Join Date
- Jun 2005
- Richmond, Virginia USA
Have a look here
Passing parameter between forms
where you double-posted the problem.
Linq ;0)>Hope this helps!
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007