Filter nested subforms with a combobox?

silentwolf

Well-known Member
Joined
May 14, 2008
Messages
1,216
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:
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
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.
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,492
Members
448,967
Latest member
visheshkotha

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
Back
Top