Solved

Parameter query in form asks for parameter twice.

Posted on 2003-12-09
8
389 Views
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?

Thanks....

Kathleen
0
Comment
Question by:kbutler
8 Comments
 
LVL 24

Accepted Solution

by:
shivsa earned 250 total points
ID: 9909567
0
 

Author Comment

by:kbutler
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?
0
 
LVL 26

Assisted Solution

by:Alan Warren
Alan Warren earned 250 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 :)
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:kbutler
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!

Kathleen
0
 

Author Comment

by:kbutler
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.

Kathleen
0
 
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 :)
0
 
LVL 32

Expert Comment

by:jadedata
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.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jadedata
EE Cleanup Volunteer
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

706 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now