subform with a query as the record source

G

Guest

I am using Access 2002. I have a form based on a table named zip code. I
have a subform based on a query named Active Vendor.

A record displayed in the Zip Code form is for one zip code. Is there way
to have the query automatically run to display all vendors within the zip
code record displayed on the form?

The query is a select query that prompts the user to enter the zip code for
which records are retrieived. Currently, nothing displays on the subform,
I'm not prompted to initiate the query.

Thanks
 
S

StevenR via AccessMonster.com

Lori said:
I am using Access 2002. I have a form based on a table named zip code. I
have a subform based on a query named Active Vendor.

A record displayed in the Zip Code form is for one zip code. Is there way
to have the query automatically run to display all vendors within the zip
code record displayed on the form?

The query is a select query that prompts the user to enter the zip code for
which records are retrieived. Currently, nothing displays on the subform,
I'm not prompted to initiate the query.

Thanks

In order for the query to update without asking you for the parameter you can
name the control on the main form that holds the zip code the same as the
parameter in the query. This will cause the subform to requery everytime the
value in the control changes.

Parameter name: @yourparam
Control name: yourparam

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top