MS Access 2013 - Getting listboxes to act like excel slicers - ms-access

I have form with a datasheet view of a table in a subform.
I have four different listboxes to filter specific column criteria in the subform.
If I make a selection in Listbox A, the subform auto updates to display that relevant information. Is there a way to force Listbox B-D to auto-update their selection options after the subform update to only show new available filter options? I'm attempting to get this page to work as closely as an excel slicer as possible.
I haven't found an option to reverse the link master/child fields. Any suggestions would be great!

Your course of action is as follows:
1. Create a function that updates the data source of ListBox according to the other LB selections
2. In the event AfterUpdate of each LB put the above function
That's it!

Related

MSAccess Query Not Refreshing After Update

I have simple table subform with 2 pulldown comboboxes. The challenge I'm having is that even though I've carefully mapped parameters to the subform's query driven table will NOT populate with data. I have made sure to have the "me.requery" event (after update) for each combobox pulldown.
Combobox 1 = [cmb_opt_verified]
Combobox 2 = [cmb_srv_capture_status]
The comboboxes are within a subform, that is embedded in to tab control, that is embedded into the parent Form
Where
Is the parent form
Is the subform
Is combobox 1
Is combobox 2
Is a table that is powered by a query with the combobox parameters mapped to it.
The table query has the subforms combo-box parameters mapped with respect to the subform's table. The expected result is a list from the application of combobox 1 AND combobox 2 user selection.
[Forms]![Server Data Workbench]![srv_AML_detail].[Form]![cmb_opt_verified]
[Forms]![Server Data Workbench]![srv_AML_detail].[Form]![cmb_srv_capture_status]
I've tried leaving the form running and switching between pulldown options, but not luck. The query is not updating at all even with refreshes. I am able to see the list if I hard code into the query either options from combobox 1 and combobox 2
Is there a way I can determine if the values that are in the comboboxes are truly making it to the query? Or is there something I'm missing in the mapping of the comboboxes to the form and query?
Any help is greatly appreciated.
Embarrassing.. my combobox was bounded to the wrong column. I fixed it by writing in a msgbox [forms]![blah]... and it displayed the recordID and not the text itself. Problem resolved. It's strange how in some cases the bounded column is right while in other cases it's wrong. guess it's MSAccess way to keep you on your toes - or the product is very buggy.

Adding Records from a pop-up query to a subform within the main form using VBA, Access 2010

I have a main Purchase_Orders Form with an Items subform. I have also created a button that opens a popup form and queries previous Purchase orders for items that have been purchased from the same supplier which has been selected on the main form. I have added an unbound checkbox to this popup query.
Now what I want to be able to do, is have an "assign" button that will select each record in the query where the checkbox = true (or 1 I'm not sure). And then input those records in to the main subform, Items.
Is this possible? and any ideas how I may go about coding this in VBA? I am pretty new to VBA but if I get anywhere with the code, I will edit this post with further info. Thanks!
If you want to add multiple items at once then you will need to use some form of unbound control, and a VBA loop to insert.
The simplest way would be to load a multi-select enabled ListBox and use that to allow the user to choose items. Then upon clicking the Assign button, you can loop through the listbox and insert the items into the table.
If you want more specific help you're going to need to provide much more specific data. Table structures, form fields/data sources, form names, perhaps some VBA behind the forms.

Parameters in rowsource query

I have a combobox query that uses parameters from a parent item. When I first load the form the combobox is empty, if I go to design view and return to form view the combobox is populated with the correct items.
While searching for the cause of this I decided to create an extra text field that retrieves the same data from the same parent item. On the first launch that textbox is populated while the combobox remains empty.
My last step was to change the combobox query parameter to refer to the newly created textbox. After that the previously working textbox started out empty as well and became populated after going to design view and back.
My hypothesis - the query tries to retrieve the parameters before the text fields are filled. Keep in mind I have reversed loading order of main-form and sub-form as explained here.
I don't know what to google for any more
You can requery the combo in the current event of the main form like so:
Me.Subform1.Form.MyCombo.Requery

Access Combo Box based on Form Record Source

I have a combo box that I want to display options based on the record source of the form. However, the record source is dynamic rather than static (i.e. it changes while doing certain things). How can I make it so that the combo box requeries itself based of what the record source is at any point in the process.
you can use the requery methode:
combobox.Requery

How can I create a Multiple Value Combo box on an Unbound Form

I need your help on MS Access 2007.
I have a big problem with my MS Access Unbound Form.
How can I create a combo box i do not want bound to a table, show a multiple value List?
The Combo is named Sector and want these values to be selected in Multiples 9Which should be possible in Access 2007) from the Drop Down List: Fertilizer, Seeds, Pesticides, Veterinary products, Animal Feed, General.
Which Select Statement or VBA code can I use. I need a solution to handle this please.
Precisely a ListBox control will help you. Since you are using it in MS Access - it makes it much easier with the wizard where you can type the items list. Or if you want to use VBA, then you can load the list using AddItem property of ListBox control in the Form_Load event.
Here is one way of doing what you want:
Open up the table your Form will use. Then: Datasheet view, Datasheet Tab, Lookup Column. Select option: I will type in ... Next Under Col1 enter one of the user choices you want; for example
A Dogs, then under that enter another choice; for example B Cats, etc Next give your lookup column label a name or stay with the default. Finally, Check Allow Multiple Values box. Finish.
You now have a table with a combo box that allows the user to select 0, 1 or many choices.
But you want it on a Form.
Create Tab, Click Form. You now have a Form that has a multi value combobox.
But you want it on a form you already created.
Right click the ComboBox. Copy. Close the table and open the form you want the ComboBox to be a part of.
Right click on a clean part of the form and Paste.
Hope this is what you were looking for.