Link to home
Start Free TrialLog in
Avatar of kbutler
kbutler

asked on

Parameter query in form asks for parameter twice.

I have a subform based on a parameter query. When I open the form, I am prompted for the parameter. When the form opens, I am prompted for the parameter again. How can I get this to work with just one prompt for the parameter?

Thanks....

Kathleen
ASKER CERTIFIED SOLUTION
Avatar of shivsa
shivsa
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kbutler
kbutler

ASKER

I created the form and query as the link suggested. How do I get behind the O.K. button on the pop up form? There is not an event procedure for "on o.k", and you can't right click on it since you can't get to it in design mode.

 Also, the parameter dialogue box asks for:  forms!name of form!control. This doesn't look so good. Is there a way to change that?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kbutler

ASKER

SELECT ContractHistoryTable.ContractYear, StudentTable.[Current Grade Level], [StudentLastName] & ", " & [StudentFirstName] AS StudentName, StudentTable.[Teacher/Section], StudentTable.Status
FROM StudentTable RIGHT JOIN ContractHistoryTable ON StudentTable.StudentSSN = ContractHistoryTable.StudentSSN
WHERE (((ContractHistoryTable.ContractYear)=[Enter Contract Year]) AND ((StudentTable.Status)="Accepted" Or (StudentTable.Status)="Active" Or (StudentTable.Status)="New Student" Or (StudentTable.Status)="Returning Student"))
ORDER BY [StudentLastName] & ", " & [StudentFirstName];

Thanks for your help!

Kathleen
Avatar of kbutler

ASKER

Hey, I fixed the sitution. I dropped the parameter query and added an unbound field to the main form which provides input to the subform. Sorry I didn't think of that sooner.

Kathleen
Hi Kathleen,

sorry didn't realise you had posted your sql, been swapping ISP's here, msg is probably stuck in the tube somewhere.

Anyway glad you got it solved!

Alan :)
Avatar of jadedata
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: shivsa {http:#9909567} & alanwarren {http:#9910624}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jadedata
EE Cleanup Volunteer