Subforms and Linking Combo Boxes to Criteria

R

R Tanner

Hi,

I have a subform based on a query displaying alot of different data
from 8 different tables. To set up this subform, I first created a
query with outer join relationships (as all of the fields are not
required, that does not mean I don't want to see all of the records)
and then I created a form which I dropped into my new form to create a
sub form. I do not have any primary keys in the query this is based
off of or consequently the forms. I want to however be able to filter
the data in my subform by a series of combo boxes which I have placed
above it. i.e. if there is no value selected, then I see all of the
records in my query (which is the last 30 days). But if I select,
say, John Doe, from the drop down, I want to see all records
pertaining to John Doe. I have been playing around with it for a
little while and I tried doing some stuff with the child/master field
links to no avail. So I figured there must be some way to link my
combo box to the criteria specification in my query that is behind the
subform. Would that be a good idea or should I try something
different?

Thanks
 
R

R Tanner

Hi,

I have a subform based on a query displaying alot of different data
from 8 different tables.  To set up this subform, I first created a
query with outer join relationships (as all of the fields are not
required, that does not mean I don't want to see all of the records)
and then I created a form which I dropped into my new form to create a
sub form.  I do not have any primary keys in the query this is based
off of or consequently the forms.  I want to however be able to filter
the data in my subform by a series of combo boxes which I have placed
above it.  i.e. if there is no value selected, then I see all of the
records in my query (which is the last 30 days).  But if I select,
say, John Doe, from the drop down, I want to see all records
pertaining to John Doe.  I have been playing around with it for a
little while and I tried doing some stuff with the child/master field
links to no avail.  So I figured there must be some way to link my
combo box to the criteria specification in my query that is behind the
subform.  Would that be a good idea or should I try something
different?

Thanks

I tried to add an expression such as the following:

=[Combo3].[AfterUpdate]([Recent Tickets].[Form]![Issue]=[Combo3])
 
R

R Tanner

I have a subform based on a query displaying alot of different data
from 8 different tables.  To set up this subform, I first created a
query with outer join relationships (as all of the fields are not
required, that does not mean I don't want to see all of the records)
and then I created a form which I dropped into my new form to create a
sub form.  I do not have any primary keys in the query this is based
off of or consequently the forms.  I want to however be able to filter
the data in my subform by a series of combo boxes which I have placed
above it.  i.e. if there is no value selected, then I see all of the
records in my query (which is the last 30 days).  But if I select,
say, John Doe, from the drop down, I want to see all records
pertaining to John Doe.  I have been playing around with it for a
little while and I tried doing some stuff with the child/master field
links to no avail.  So I figured there must be some way to link my
combo box to the criteria specification in my query that is behind the
subform.  Would that be a good idea or should I try something
different?

I tried to add an expression such as the following:

=[Combo3].[AfterUpdate]([Recent Tickets].[Form]![Issue]=[Combo3])- Hide quoted text -

- Show quoted text -

Okay This is what I am doing. I have a form, [Recent Tickets Form],
bound to a query called [Recent Tickets]. I have a subform inside of
[Recent Tickets Form] called [Recent Tickets]. [Recent Tickets] form
displays everything in [Recent Tickets] query. The [Recent Tickets]
query includes 8 tables, 7 parent and 1 child. I tried adding all of
the Primary key fields to the query to see if I could get that to
help me with my filter I have on [Recent Tickets Form] - with linking
the master/child fields and such. In my combo box on [Recent Tickets
Form] - which should search by the account number and pull up the
relevant record, I have the following for the Row Source..

SELECT [Recent Tickets].Account FROM [Recent Tickets];

In [Recent Tickets] (my subform), I have the following in my master/
child fields:

Tickets.ID (This is the primary key, which is added in [Recent
Tickets] query)

I also have an embedded macro as follows:

Action: ApplyFilter
Arguments: [Recent Tickets].[Account]=[Recent Tickets Form].[Account]

What am I missing?
 

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