parameter form filter pop up twice

A

accessuser

hi,

I'm creating a database for my work and need some help on parameters. I have
a main table, where my queries are based on. I have many queries with
critiria of [enter year], and "department name"., and then I create each
department forms base on the department queries. When I open up my forms,
parameter shows up the parameter box [enter year], and I enter the year and
it gave me all the information i need.

Here is my question

When I am in the department forms, and try to do a "filter by form" to narrow
down records, the same parameter [Enter year] pop up twice. I can understand
it to show up once, but not two. Can someone explain this to me? Is there
any way to fix this problem?


Thank you.
 
J

John Vinson

hi,

I'm creating a database for my work and need some help on parameters. I have
a main table, where my queries are based on. I have many queries with
critiria of [enter year], and "department name"., and then I create each
department forms base on the department queries. When I open up my forms,
parameter shows up the parameter box [enter year], and I enter the year and
it gave me all the information i need.

Here is my question

When I am in the department forms, and try to do a "filter by form" to narrow
down records, the same parameter [Enter year] pop up twice. I can understand
it to show up once, but not two. Can someone explain this to me? Is there
any way to fix this problem?


Thank you.

How about having just ONE form (instead of one for each department),
and no popup prompts at all?

You can have a switchboard form (frmSwitch) with a textbox (txtYear)
and a combo box showing all departments (cboDepartment). Your data
entry/editing form could be based on a query with

=[Forms]![frmSwitch]![txtYear]

for the year field, and

=[Forms]![frmSwitch]![cboDepartment]

for the Department.


John W. Vinson[MVP]
 
A

accessuser

thanks for your reply. But I am not looking to change my switchboard design.
My concern is when I am in the dept forms and use "filter by form" after I
click "apply filter" the parameter box pops up twice for the same question
"Enter Year". I am almost finished with my database and need to fix this
parameter problem. Why it pops up twice ?? Is there anything else that I can
do to fix this?

thanks

John said:
[quoted text clipped - 13 lines]
Thank you.

How about having just ONE form (instead of one for each department),
and no popup prompts at all?

You can have a switchboard form (frmSwitch) with a textbox (txtYear)
and a combo box showing all departments (cboDepartment). Your data
entry/editing form could be based on a query with

=[Forms]![frmSwitch]![txtYear]

for the year field, and

=[Forms]![frmSwitch]![cboDepartment]

for the Department.

John W. Vinson[MVP]
 
J

John Vinson

thanks for your reply. But I am not looking to change my switchboard design.
My concern is when I am in the dept forms and use "filter by form" after I
click "apply filter" the parameter box pops up twice for the same question
"Enter Year". I am almost finished with my database and need to fix this
parameter problem. Why it pops up twice ?? Is there anything else that I can
do to fix this?

Probably once when it's opening the Form, and a second time when it's
opening the Subform. Without a clearer understanding of the database
it's hard to say.

One possible alternative would be to put unbound controls on the
Form's Header, and use them as criteria; requery the form in each
control's afterupdate event. Alternatively, you could launch a small
unbound form to solicit the criteria, and launch your mainform from
that.

If you use [Enter date:] as a criterion - you'll get the popup. No way
to avoid it. If you use it as a criterion on two queries, you'll get
the popup twice; no way to avoid that either!

If you use a Form Control as a criterion instead, you won't get the
popups. Your choice!

John W. Vinson[MVP]
 
A

accessuser

ok Thanks! I think I'll just deal with two parameters. It seems like it
happens only when I use my access 2000. Do you know if it makes difference
in 2000 or 2003?

John said:
thanks for your reply. But I am not looking to change my switchboard design.
My concern is when I am in the dept forms and use "filter by form" after I
click "apply filter" the parameter box pops up twice for the same question
"Enter Year". I am almost finished with my database and need to fix this
parameter problem. Why it pops up twice ?? Is there anything else that I can
do to fix this?

Probably once when it's opening the Form, and a second time when it's
opening the Subform. Without a clearer understanding of the database
it's hard to say.

One possible alternative would be to put unbound controls on the
Form's Header, and use them as criteria; requery the form in each
control's afterupdate event. Alternatively, you could launch a small
unbound form to solicit the criteria, and launch your mainform from
that.

If you use [Enter date:] as a criterion - you'll get the popup. No way
to avoid it. If you use it as a criterion on two queries, you'll get
the popup twice; no way to avoid that either!

If you use a Form Control as a criterion instead, you won't get the
popups. Your choice!

John W. Vinson[MVP]
 
J

John Vinson

ok Thanks! I think I'll just deal with two parameters. It seems like it
happens only when I use my access 2000. Do you know if it makes difference
in 2000 or 2003?

I rarely use prompts (form references are more user friendly and more
controllable), and I've never encountered the repeated prompt problem
myself, so I really couldn't say!

John W. Vinson[MVP]
 
A

accessuser via AccessMonster.com

You mentioned of using a "unbound controls" on Form's header, can you explain
little more of it. I dont know how to link them. Can you provide the VBA
code or steps that I can follow. I want to give it a try and see what
happens.

Let me give you little more information regarding my database. One main
table with all the information. Many quries from this Main Table divided
into different departments. I want to limit users to view only information
that are related to their departments. My forms are created base on
"department queries". So if i create unbound box, will have to I need to
create one or two? Department Queries have their department name on the
Criteria, so do I still need to create an unbound box for "department' or
just the "year"?

thank you so much for you helps!


John said:
thanks for your reply. But I am not looking to change my switchboard design.
My concern is when I am in the dept forms and use "filter by form" after I
click "apply filter" the parameter box pops up twice for the same question
"Enter Year". I am almost finished with my database and need to fix this
parameter problem. Why it pops up twice ?? Is there anything else that I can
do to fix this?

Probably once when it's opening the Form, and a second time when it's
opening the Subform. Without a clearer understanding of the database
it's hard to say.

One possible alternative would be to put unbound controls on the
Form's Header, and use them as criteria; requery the form in each
control's afterupdate event. Alternatively, you could launch a small
unbound form to solicit the criteria, and launch your mainform from
that.

If you use [Enter date:] as a criterion - you'll get the popup. No way
to avoid it. If you use it as a criterion on two queries, you'll get
the popup twice; no way to avoid that either!

If you use a Form Control as a criterion instead, you won't get the
popups. Your choice!

John W. Vinson[MVP]
 
A

Allen Browne

John is talking about typing something like this into the Criteria of your
query:
[Forms].[Form1].[Text0]

If the form is open when you run the query, it reads the value from the text
box on the form instead of popping up the Parameter dialog.

Another example:
http://allenbrowne.com/casu-08.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

accessuser via AccessMonster.com said:
You mentioned of using a "unbound controls" on Form's header, can you
explain
little more of it. I dont know how to link them. Can you provide the VBA
code or steps that I can follow. I want to give it a try and see what
happens.

Let me give you little more information regarding my database. One main
table with all the information. Many quries from this Main Table divided
into different departments. I want to limit users to view only
information
that are related to their departments. My forms are created base on
"department queries". So if i create unbound box, will have to I need to
create one or two? Department Queries have their department name on the
Criteria, so do I still need to create an unbound box for "department' or
just the "year"?

thank you so much for you helps!


John said:
thanks for your reply. But I am not looking to change my switchboard
design.
My concern is when I am in the dept forms and use "filter by form" after
I
click "apply filter" the parameter box pops up twice for the same
question
"Enter Year". I am almost finished with my database and need to fix this
parameter problem. Why it pops up twice ?? Is there anything else that I
can
do to fix this?

Probably once when it's opening the Form, and a second time when it's
opening the Subform. Without a clearer understanding of the database
it's hard to say.

One possible alternative would be to put unbound controls on the
Form's Header, and use them as criteria; requery the form in each
control's afterupdate event. Alternatively, you could launch a small
unbound form to solicit the criteria, and launch your mainform from
that.

If you use [Enter date:] as a criterion - you'll get the popup. No way
to avoid it. If you use it as a criterion on two queries, you'll get
the popup twice; no way to avoid that either!

If you use a Form Control as a criterion instead, you won't get the
popups. Your choice!

John W. Vinson[MVP]
 
A

accessuser via AccessMonster.com

This is very close to what I want to create right now, but I dont know to
display information is such way, because my form entries contain many fields.
I tried, but it doesn't seem to work. Is there anything I can do like,
create a form by design view, put two textboxes there, "Enter Year" and
"Documentation Type", has a command button called "Search", and then it will
open up my department forms with the what users requested. "Enter Year" and
"Documentation type" doesn't have to be "AND" criteria. If users only put
values in "Year", then they will get everything from that year, but if they
want both "year" and "Documentation type", the access will still disaply the
matching records. And I want this form search to open up records in my
department forms. This search form will base on the query, right? By adding
an extra search form, will my department forms still be linked to my queries?
Can this search form be done? If can, how are the steps?

Hope this doesn't sound confusing.

Thank you so much!

Allen said:
John is talking about typing something like this into the Criteria of your
query:
[Forms].[Form1].[Text0]

If the form is open when you run the query, it reads the value from the text
box on the form instead of popping up the Parameter dialog.

Another example:
http://allenbrowne.com/casu-08.html
You mentioned of using a "unbound controls" on Form's header, can you
explain
[quoted text clipped - 43 lines]
 
A

Allen Browne

You will need to take this one step at a time, to accomplish everything you
want to do, and if you have never written code before, this will take you
some time to do.

You could start with this article:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html
Download the example, and examine how the search form works. When you
understand it, you can create one to suite your requirements.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

accessuser via AccessMonster.com said:
This is very close to what I want to create right now, but I dont know to
display information is such way, because my form entries contain many
fields.
I tried, but it doesn't seem to work. Is there anything I can do like,
create a form by design view, put two textboxes there, "Enter Year" and
"Documentation Type", has a command button called "Search", and then it
will
open up my department forms with the what users requested. "Enter Year"
and
"Documentation type" doesn't have to be "AND" criteria. If users only put
values in "Year", then they will get everything from that year, but if
they
want both "year" and "Documentation type", the access will still disaply
the
matching records. And I want this form search to open up records in my
department forms. This search form will base on the query, right? By
adding
an extra search form, will my department forms still be linked to my
queries?
Can this search form be done? If can, how are the steps?

Hope this doesn't sound confusing.

Thank you so much!

Allen said:
John is talking about typing something like this into the Criteria of your
query:
[Forms].[Form1].[Text0]

If the form is open when you run the query, it reads the value from the
text
box on the form instead of popping up the Parameter dialog.

Another example:
http://allenbrowne.com/casu-08.html
You mentioned of using a "unbound controls" on Form's header, can you
explain
[quoted text clipped - 43 lines]
 

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