Advertisement

07.08.2008 at 02:26PM PDT, ID: 23548365 | Points: 500
[x]
Attachment Details

Microsoft Access Form

Asked by dkintaudi in Access Forms

Tags: Microsoft, Office, 2003, Microsoft Access Form, Visual Basic

I'm trying to filter a subform based on fields selected from a field list and criteria chosen.  
So far I'm trying to use the following code, but I'm having a little trouble with it.  I know this is a question only an expert could probably answer, so I'm assigining it the maximum value.  Thanks.

Private Sub Set_Filter_Click()

Dim strSQL As String, intCounter As Integer 'Build SQL string.
For intCounter = 1 To 3
If Me("Filter" & intCounter) <" " Then

strSQL = strSQL & "[" & Me("Filter" & intCounter).Tag & "]
" & " = " & Chr(34) & Me("Filter" & intCounter) & Chr(34) & " And "
End If
Next

If strSQL <"" Then ' Strip Last " And ".
strSQL = Left(strSQL, (Len(strSQL) - 3)) ' Set the Filter
Property.
Reports![rptOwner].Filter = strSQL
Reports![rptOwner].FilterOn = True
End If

End SubStart Free Trial
[+][-]07.08.2008 at 03:03PM PDT, ID: 21958737

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]07.08.2008 at 06:15PM PDT, ID: 21959830

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.

 
[+][-]07.11.2008 at 12:12AM PDT, ID: 21980471

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.

 
[+][-]07.15.2008 at 10:55AM PDT, ID: 22009188

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]07.15.2008 at 12:25PM PDT, ID: 22010137

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.

 
[+][-]07.15.2008 at 01:40PM PDT, ID: 22010876

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]07.15.2008 at 06:46PM PDT, ID: 22012696

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.

 
[+][-]07.16.2008 at 06:41AM PDT, ID: 22015783

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]08.05.2008 at 01:41PM PDT, ID: 22164985

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]08.05.2008 at 04:42PM PDT, ID: 22166032

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.

 
[+][-]08.05.2008 at 04:59PM PDT, ID: 22166122

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

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