Displaying Query Results in Form

ihateboscastle

New member
Local time
Today, 12:10
Joined
Sep 13, 2006
Messages
1
Forgive me for what may sound like a dum question -- Access is completely new to me.

I have my table. I have this displayed as a form.

At the bottom of the form, I have a text box and a command button.

The user enters in a key value. The command button triggers a macro that runs a query.

Now, I'd like the form to display the data returned from the query. How?

I tried creating a new form with its Record Source set to the query. I had the macro close the original form, run the query and open the new form. But before the new form could be opened, Access prompted me for a 'parameter value' (I assume so that the query could be run again).

What am I doing wrong?
 
Since the record source is already set, you shouldn't need to run the query first. Just open the form.

Hope this helps?
 
Review the parameters (usually field names) you supplied to your query. It seems to be looking for some parameters specified in your query but could not find it. Review all the criteria as well. There could be some typing errors somewhere.
 
Every time you open a form based on a query, the query runs.

If you are using a parameter in your query that depends on a value that is on your original form, then you shouldn't close your original form. It is asking you for a parameter because it can't find the control on the original form.

As has been said, just open the new form (without closing the original one).
 

Users who are viewing this thread

Back
Top Bottom