Filtering records based upon another table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have many combo boxes that get their content from another table. Although
I can build a query that will accurately produce a dynaset based on info in
another table, I can't get the macro to filter records in the form. What am
I doing wrong?
 
Brian,

Can you please give an example to illustrate what you are trying to do?
And explain the macro you are referring to? Thanks.
 
Thanks Steve. I have a contacts database with address info, etc. of business
associates. I store the tiltes in a seperate table that a combo box displays
on the form. When I do a query based on title, the dynaset returns
accurately without any problems. When I do a macro to filter based on the
query it does not return the data. (it will usually display a box asking me
to enter "title.titles" or something similar.

Brian
 
Yes, sorry, thought I had included that.

SELECT Title.Title, Organization.*
FROM Title INNER JOIN Organization ON Title.ID = Organization.Title
WHERE (((Title.Title) Like [Enter Title]));


Steve Schapel said:
Brian,

You mentioned that you have a query that the ApplyFilter refers to. Are
you able to post back with a copy/paste of the SQL view of that query?

--
Steve Schapel, Microsoft Access MVP
Steve, your help is greatly, greatly appreciated.

Here is the SQL from the query for the "county" drop down box:
SELECT [County List].County
FROM [County List]
ORDER BY [County List].County;

The row source for the box is:
County List Query

However, as I went from box to box (there are many on the form) I noticed
some had SQL in the row source. I also noted that when I pressed the button
to activate the filter/query, a different SQL statement showed up, but I
couldn't read it because it's too long and it is only present when the
requesting box is open.

Thanks again.
 
Yes, that's what I intended. But I get prompts like (and I'm paraphrasing):
Enter [Title].[title] when I run the macro in addition to my [Enter Title]
prompt.

Don't know how my name changed like that either. :P Although I am checking
the "notify me of replies" box, I'm not getting notified, so I apologize for
the delay in responding.

Steve Schapel said:
Brian,

Well, it is interesting to see your progression from O'Malley to
O''Malley to O''''Malley :-)

To be honest, I am still fairly confused about what you are doing and
what thre problem is. This query that you have posted, contains a
Parameter [Enter Title] so whenever the query is run, you will be
prompted to provide a value for Title, which the query will then use as
a criterion. Is this what you intended?

--
Steve Schapel, Microsoft Access MVP

Yes, sorry, thought I had included that.

SELECT Title.Title, Organization.*
FROM Title INNER JOIN Organization ON Title.ID = Organization.Title
WHERE (((Title.Title) Like [Enter Title]));
 
Brian,

So, is there a field in the Title table named Title?

Please give the exact wording of the parameter being prompted for.
 
Back
Top