Parameter query in form asks for parameter twice.

Posted on 2003-12-09
Medium Priority
Last Modified: 2008-02-01
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?


Question by:kbutler
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 24

Accepted Solution

shivsa earned 1000 total points
ID: 9909567

Author Comment

ID: 9909838
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?
LVL 26

Assisted Solution

by:Alan Warren
Alan Warren earned 1000 total points
ID: 9910624
Hi Kathleen,

Can you post the sql script from your parameter query for your original form please?
To view query sql script:
Open the query in design view > Menu > View SQL

Alan :)
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.


Author Comment

ID: 9913635
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!


Author Comment

ID: 9925417
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.

LVL 26

Expert Comment

by:Alan Warren
ID: 9925451
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 :)
LVL 32

Expert Comment

ID: 10271910
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.

EE Cleanup Volunteer

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question