![]() |
| |||||||
| Sponsored Links |
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| Hey guys I have a problem that's been giving me trouble for a couple days now. I have a search form with several combo boxes and buttons to generate reports. The values of the combo boxes feed into the query criteria then the report generates records based on these criteria. All but one of the combo boxes are based on values I type in. The other is based on a table named tblCampaigns that has only one field: CampaignName. What I would like to do is get this combo box to have an ALL option that brings up records based on every campaign name. Here's my current row source: SELECT tblCampaigns.CampaignName FROM tblCampaigns; Thanks in advance! |
| Sponsored Links |
|
#2
| ||||
| ||||
| I assume your using a query to provide the filters based on the combo value? Lets say your report is based on a query,. using the below in the criteria of the field you are filtering will provide all when the combo is left blank. Code: Like "*" & [Forms]![FormName]![ComboName] & "*"
__________________ If i helped you, make me famous by clicking the |
|
#3
| |||
| |||
| Thanks man, that works great! Just one thing though, This works when the value for the combobox is blank. Is there anyway to make the blank value say "ALL" without adding another column? Alternatively, is there any way to make the blank an option? As of right now it's just the default value and then when you click another campaign you can't get back to it. |
|
#4
| ||||
| ||||
| I'm not sure at the moment about adding an "all" to the selection as this would be criteria filtered on. But the easiest way to clear the filter would be to add a small command button next to the combo with the following on click event. Code: Private Sub Command_Click() Me.ComboName = Null End Sub |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| adding numbers | todd2006 | JavaScript Programming | 2 | July 3rd, 2008 01:38 PM |
| Combo Box - Add Entry Not In List | AOG123 | Microsoft Access | 0 | June 6th, 2008 09:35 AM |
| delete button | techker | Microsoft Access | 14 | May 21st, 2008 08:56 AM |
| Webform Default Button | Devwhiz | .Net Development | 9 | May 15th, 2008 01:15 PM |
| [ASP/VBScript] Dynamic Combo Maker | mehere | Code Samples | 0 | March 28th, 2008 09:40 AM |