Filtered query problems

G

gdonald20

Hi

I was wondering if anyone could help me with this problem.

I have a form based on a query. When you press the button to open the form
the query asks you for the year you are interested in.

This works perfectly but once in the form if you change the contents of the
combo box it is obviously requirying again and therefore the message box
opens again asking for the year.

I understand why it does this but is there a way so that once you you
entered the year you are interested in you can't change it unless you exit
the form and then re-enter?

Thanks

Gillian
 
M

mscertified

Your question is somewhat vague.
What is this combo box you are changing?
If it is the year, just lock the contents so it cannot be changed. In fact,
why even have it there if you cannot change the year?
You should look in Access help for the properties 'enabled' and 'locked'.

-Dorian
 
D

Duane Hookom

Don't use parameter prompt queries. Get your criteria from controls on
forms.

I'm not sure why changing the contents of a combo box obviously requeries a
form. This isn't a default behavior.
 
G

gdonald20

Hi

Sorry for the vague explanation.

The query picks up the purchase orders table and filters it by the users
inputed year.

My form purchase order has a subform which runs on this query, therefore
when you open the form it asks you what year you are interested in.

On the form is a combo box which allows you pick the supplier you require
and then purchase order details are featured in a subform below. Therefore
when you change the combo box with the supplier you need to requery the
subform to get the details for that particular supplier.

Thanks

Gillian
 
D

Duane Hookom

As I stated, get the year from a control on a form. Why not use a text box
or combo box on your main form.
 
G

gdonald20

Thanks for that it worked perfectly

Gillian

Duane Hookom said:
As I stated, get the year from a control on a form. Why not use a text box
or combo box on your main form.
 

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