Parameter queries (XP, 2000)

I have two questions about a parameter query:

1) I have a subform that displays the results of a parameter query. Problem is, when I open the main form, the parameter box pops up asking for the parameter. I would like to stop this as the query should only be run on demand - not automatically. I thought there was some way I could connect it to a command button or have a parameter text box on the form.

2) Same query - it works well so long as I only query one table. However, there is a second table that contains multiple records for each record in table 1. I would like to display the query results such that the records in table 2 are counted for each of the table 1 records returned in the query. Something like below where collecor is in one table and a list of coins and owners is in table2:

Re: Parameter queries (XP, 2000)

1) Why is your subform based on a parameter query? If you link the subform to the parent form using master/child links, there isn't any need for a parameter query. Subforms load first, so the parent form hasn't yet loaded its recordset when the subform prompts for the parameter query. If you don't want the subform populated at load, remove the sourceobject from the subform control and set it in code later. However, you're still going to have problems if the subform is based on a parameter query. I see no reason to only load the subform on demand. That is counter intuitive and much harder to implement than simply using the master/child links. You're making work for yourself.

2) You should link to a totals query on the table, not to the table itself. If you use an outer join between the key field in the table and the query, it should work. However, if you want real help, you'll have to post the SQL that is not working.