Re: Show all records through combo box



I am sorry that i have confused you even more. Let's see if i can explain
this better. I should not have used the term report to describe what it is I
am trying to do, because this is a DB term. I should say that the report i
was refering to is a MCReport (multi-client report). The MCReport is one of
the main ways all the data is related. Each company appears in at least one
MCReport. And in each MCReport, the company supplies different Products, has
different Customers, Affiliates, Strategies, and Processes. Products,
Customers, Affiliates, Strategies, Processes, Companies, and MCReports are
all tables. Hopefully this is starting to clear things up. The subform for
Products used to display all products that the company supplied for all
MCReports. Now that i have added the combo box, only products that the
company supplied for the chosen MCReport are displayed. Like i said i linked
the subforms to the main form using the Company_ID and the MCReport_ID. The
MCReport_ID is not field that is associated with the query that returns all
of the company names that is tied to the main form. Instead it is solely
used on the combo box, and this is where i believe i am having my problem.
Now there is code linked to After Update on the combo box, however it calls a
requery only for the subform associated with the Products subform. Because
all of the other subforms change according to the MCReport selected in the
combo box, i do not think that the code in the After Update is necessary let
alone working. There is no code in the filter section. This question has
not deviated from my original question, rather it is much much more complex
than originally thought. My question is still: how do i go about displaying
all records for that company in each subform using the combo box? (i.e. all
products supplied by said company regardless of MCReport, all process used by
company regardless of MCReport, and so on and so forth.)

For now let's only concentrate on this matter and if we ever come to a
solution i can ask about my other question.

I hope that this clarifies things for you and again i thank you for any help
you can provide. I will try to look through the communities again to find
any previous topics about this to see if i can come across any information
that will be helpful in completing this.

"BruceM" wrote:

I'm still confused. What do you mean by the following:
"Before I added the combo box ... to filter the data, each subform displayed
the data across all of the report types." If the subforms contain related
records, what are you filtering? And what do you mean by "report types"?

"I added an unbound combo box (choices are the names of the reports) and set
up links that link the subforms to the combo box in order to filter the data
by report." Filtering data by report means nothing to me. You can filter
by form, and by selection, and maybe something else I've forgotten, but not
by report. Where did the reports come from anyhow? How are they connected
to the subform?

"I did not inlude any events tied to After Update for any of the subforms."
When using a combo box for filtering you would typically use the combo box
After Update event to apply the filter. Does the combo box have an After
Update event? If so, what is it? If not, how is the filter being applied?
What is the filter?

To open the form with the filter off, place the line of code I have
mentioned several times into the form's Open event.

Have you tried the command button I mentioned? It would remove the filter.
The methods in the links I provided would also accomplish that.

You will need to describe in non-database terms just what you want to
accomplish. You will also need to provide your table structure and
relationships. What you are asking now is far, far from your original
question.

"JKarchner" <JKarchner@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:34BCD9F2-B674-4E7F-9DDA-BF0981BE05FD@xxxxxxxxxxxxxxxx
I'm sorry if I am confusing you about this matter i will try to explain it
better. The main form is a single form that displays one company at a
time.
For each company there this 5 subforms, that each hold information
regarding
customers, products, processes, strategies, and affiliates. Before i
added
the combo box (the combo box is on the main form and not on the subforms)
to
filter the data, each subform displayed the data across all of the report
types. I added an unbound combo box (choices are the names of the
reports)
and set up links that link the subforms to the combo box in order to
filter
the data by report. When i did this i lost the option to display all of
the
data in subforms, and that is when i asked for your help in order to
display
all of the data. I did not inlude any events tied to After Update for any
of
the subforms. It appears that the link fields are solely what are
filtering
the data in the subforms. I do not know if this was the correct way to go
about doing this or not. Of all the suggestions i found for filtering the
data, this method seemed to be the only one that worked. If you have a
better method to go about doing this i would appreciate it.

By default, i mean that when i first open up the form i want all data to
appear, i do not want it to be filtered at all. I would like the option
to
be able to "go back" and view all data again after a certain report is
selected in the combo box.

Let me know if you need any more explanation than this, as i believe that
i
can answer any questions you might have. Again thank you very much for
helping me do this. It is greatly appreciated.

"BruceM" wrote:

The union query is to add (All) to the recordset. Without the union
query
you would probably need to create a dummy record. By the way, there are
two
choices at the link. One is to use a user-defined function, the other is
to
use a union query. There is no union function as such.

What do you mean "default choice in the combo box"? Do you want (All) to
appear any time you move to another record? What exactly do you want to
accomplish?

If you are filtering the data, do you want to remove the filter, or do
you
want to go from one filtered recordset to another? I assume the point of
(All) is to remove any filters. If so, the link provides two options for
doing so by way of a combo box. An "All Records" command button as I
described is another way.

"JKarchner" <JKarchner@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CC04EFC3-F20F-4825-B678-57AF5DAFACA8@xxxxxxxxxxxxxxxx
Thank you for the help. I was having trouble trying to find some of
the
results. They all vary slightly and some are a lot different than what
i
want.

Ok the page you sent me to shows how to add "All" to my combo box. I
do
not
need to use the union function to display all of the data, because my
data
should already be there. The combo box is what is filtering out most
of
the
data to only the needed results. Also how would you go about setting
it
up
so that "All" is the default choice in the combo box. I tried setting
the
default value to "All" but i was given an error.

Again, im sorry that this request has been asked many times, i just
thought
that this varied enough from the others to be asked. Thank you for any
help
you can provide.

"BruceM" wrote:

If you mean to select an All button from the combo box, you could try
the
method here:
http://support.microsoft.com/?id=210290
You could also just add a command button with the following in its
Click
event:

Me.FilterOn = False

That code could go elsewhere, such as the combo box double-click
event,
if
you like. It would be more efficient for the user than having to
select
something from the combo box, and much simpler for you to set up.

This question has been asked and answered before. A Google groups
search
should lead you to a variety of ideas.

"JKarchner" <JKarchner@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F66A5215-1038-4636-8801-CC6463B4F4D6@xxxxxxxxxxxxxxxx
I currently have a combo box set up to filter records in all of my
subforms.
How would i go about using the combo box to show all records at the
same
time?









.