Advertisement

01.31.2008 at 05:23AM PST, ID: 23126068
[x]
Attachment Details

Set Filter on Query after Combo Box Selection

Asked by jmar1946 in Access Forms, Microsoft Applications, Access Reports

Tags: , , ,

I need to set a filter on a query so I can run a report from a joined query.  I want to do this from a form, since I already have selected a record with the [acct nbr] I want.  I just can't figure out how to do this but I thought it would be simple.  I need to run a report  that is filtered from the joined query so I can run a text stream to put into Outlook.  I have the Outlook section done.  I just need the filtered text stream.

If I can't filter the query from the combo box VBA, then filtering from the Forms![acct nbr] is fine.  Or, filtering the report by [acct nbr] is fine as well.

The Combo box VBA is below.

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
Private Sub Combo34_AfterUpdate()
    ' Find the record that matches the control.
    Dim rs As Object
 
    Set rs = Me.Recordset.Clone
    rs.FindFirst "[ID] = " & Str(Nz(Me![Combo34], 0))
    If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
[+][-]01.31.2008 at 05:31AM PST, ID: 20786294

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Forms, Microsoft Applications, Access Reports
Tags: Microsoft, Access, 2003, VBA
Sign Up Now!
Solution Provided By: ldunscombe
Participating Experts: 3
Solution Grade: A
 
 
[+][-]01.31.2008 at 05:31AM PST, ID: 20786297

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.31.2008 at 05:35AM PST, ID: 20786334

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.31.2008 at 05:43AM PST, ID: 20786387

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628