Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

Thread Tools Rate Thread Display Modes
Old 03-04-2013, 06:37 AM   #1
Newly Registered User
Join Date: Mar 2013
Posts: 5
Thanks: 2
Thanked 0 Times in 0 Posts
annika05 is on a distinguished road
Exclamation 3 Combobox filtering report -help on enter parameter values

Hello, I'm doing a form to filter a report and make a 3 combobox to filter my report

inmy case i already came up with code but after i put the 3rd combobox the filter doesn't recognize it and popup a enter parameter value

can someone help me fix this so i can use 3 combobox filter without a problem


this is my code that im using

Option Compare Database

Private Sub CLEAR1_Click()
Dim intCounter As Integer
For intCounter = 1 To 3
Me("Filter" & intCounter) = ""
End Sub

Private Sub Filter1_AfterUpdate()

End Sub

Private Sub Form_Close()
DoCmd.Close acReport, "REPORT1" '
DoCmd.Restore 'Restore the window size
End Sub

Private Sub Form_Open(Cancel As Integer)
DoCmd.OpenReport "REPORT1", acViewPreview, , strSQL
DoCmd.Maximize 'Maximize the report window.
End Sub

Private Sub SET1_Click()

Dim strSQL As String, intCounter As Integer

' Build SQL String.
For intCounter = 1 To 3
If intCounter = 2 Then
strSQL = strSQL & "[" & Me("Filter" & intCounter).Tag & "] = #" & Me("Filter" & intCounter) & "# And "
strSQL = strSQL & Me("Filter" & intCounter) & " And "
End If
If strSQL <> "" Then
' Strip Last " And ".
strSQL = Left(strSQL, (Len(strSQL) - 5))

' Set the Filter property.
Reports![REPORT1].Filter = strSQL
Reports![REPORT1].FilterOn = True
End If
End Sub

annika05 is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Report asking to enter a parameter value Tina49 Reports 6 06-17-2013 01:58 AM
** HELP***Filtering Subform by textbox AND combobox values!!! emilyanne2010 Forms 0 02-02-2011 08:32 AM
As I enter values, I would like them to be updated to a list to be used in a combobox hijfte Forms 2 03-22-2009 12:15 PM
filtering the report via combobox foremorecoast Forms 1 01-16-2008 06:30 AM
Enter Parameter Value/Report pretoria Reports 2 08-07-2005 11:58 PM

All times are GMT -8. The time now is 11:26 AM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World