Filter nested subforms with a combobox?

silentwolf

Well-known Member
Joined
May 14, 2008
Messages
1,134
Office Version
  1. 2016
Hi Guys,
I have been looking over and tried different ways to get in a mainform a nested subform filtered without any luck :( Maybe someone knows how to do that!?
My current situation:
I got a main form called frmChemieMain and a nested Subform (pageForm) not sure if that is the right name for it? (One page = Chemie, Second page = Artikel)
In the main form I have two fields ChemieArtID and ChemieArt and I am able to have the subform updated when I go from one record to the next.
However I rather would have a combobox in the mainform to be able to select ChemieArtID so the (PageForm) gets updated when the user select one ChemieArt of that combobox.
I tried different ways of doing this via vba but can not make it to work.
So maybe someone does know how do achive that and could please let me know :)

:confused:
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

crimson_b1ade

Well-known Member
Joined
Sep 27, 2008
Messages
1,557
I would say you need to build both your main form and your sub form using queries as your source rather than the tables themselves. That way you can filter your queries using the combobox selection from your main form. To fill your combobox on the main form you can use an SQL statement in the Row Source property box.
 

xenou

MrExcel MVP
Joined
Mar 2, 2007
Messages
16,793
Office Version
  1. 2019
Platform
  1. Windows
Not sure but if you mean you want to use a combo box to navigate to a record then this may help (it seems a bit complicated but in the end it's not too hard):
http://allenbrowne.com/ser-03.html

Without code, Access seems to expect you to use the FIND dialog to find (i.e., go to) records.
 

silentwolf

Well-known Member
Joined
May 14, 2008
Messages
1,134
Office Version
  1. 2016
Hi Crimson b1ade,
thanks for your reply! At the moment I am working on getting my database strukture right so I had not much time to look to close of what you sugested.
But I will keep your advice in mind!

Many thanks

SW
 

silentwolf

Well-known Member
Joined
May 14, 2008
Messages
1,134
Office Version
  1. 2016
Hi Xenou,
many thanks for your reply.
I will take a look at it and let you know how I am getting along with it.

Many thanks
SW
 

Watch MrExcel Video

Forum statistics

Threads
1,122,841
Messages
5,598,388
Members
414,234
Latest member
grlevesq

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top