form issue - parameter query

verdes

Registered User.
Local time
Today, 11:01
Joined
Sep 10, 2012
Messages
49
I have a parameter query that selects a group of records in a table based on the entered year. Let’s call the query – paramYearqry
paramYearqry is the control source of a form that puts the group of records on a tab/page on the form. Let’s call this form – yearRecordsfrm.
I have a different form (let’s call it – theCallingfrm) that has an on-click event to open yearRecordsfrm. When the event fires, I get the prompt to enter the parameter and the yearRecordsfrm opens correctly.
I want to enter the parameter year in a control on theCallingfrm so that the yearRecordsfrm opens without the prompt because it is using the year that was entered on theCallingfrm.
I can’t get it to work correctly. Please help!
 
You would open the form with the parameter and then go into design view, then open the query in design view. Then look to use the Expression builder where you have the year field and then in the Expression builder you would select the form and the field that you want to use.
 
Thanks Trevor,

But that didn't work. I just don't know what I'm doing wrong. I really thought the expression thing was going to work because I typed the form field name in myself and may have typed it wrong.

I appreciate your help. The form I enter the year on is open, but when the openform command is executed the new opened for does not display any of the records from the parameter... query.

The regular parameter query form opens fine when the openform command is executed. I just don't understand what I'm doing wrong.....

Thanks again
 
Can you post a copy of your DB in A2003 mdb format.
 
Forgive me for being so dumb....but how do I post the db to this forum
 
My database is too large. I stripped it down - and removed data. The zipped file size is 2.80......

I'm sad.
 
I hope I didn't post this twice....

The 2 forms I'm having trouble with is frmAppointments and frmAnnualConvAppt.

frmAnnualConvAppt has the parameter query as the control source.
 

Attachments

I think the SQL for the convScheduleYear_qry query should be:

SELECT convSchedule_tbl.convscheduleNo, convSchedule_tbl.convscheduleName, convSchedule_tbl.convscheduleStartDate, convSchedule_tbl.convscheduleEndDate, convSchedule_tbl.convscheduleYear, convSchedule_tbl.convscheduleID, convSchedule_tbl.convscheduleHostpastor, convSchedule_tbl.convscheduleHostelder, convSchedule_tbl.convscheduleHostchurch, convSchedule_tbl.convscheduleNotes, convSchedule_tbl.convscheduleyearNo
FROM convSchedule_tbl
WHERE (((convSchedule_tbl.convscheduleYear)=[Forms]![frmAppointments]![ConvYear]))
ORDER BY convSchedule_tbl.convscheduleNo, convSchedule_tbl.convscheduleYear DESC;
 
I'm so happy!!!!!!!

It worked!!

Thank you so much!!!!!!!
 

Users who are viewing this thread

Back
Top Bottom