
VBA
Get flash to fully experience Pearltrees
I often use a combobox to filter.For an example, when browsing between the tasks assigned to the staff, it can be selected, which co-workers jobs should be displayed.It occurs sometimes, that in an Access form we have to include to a combobox / dropdown list an “Any/All” item, which can be used, when we don’t want to filter according to the co-workers.I have a stylish/interesting solution for this problem.I create a query, which shows only the active records in alphabetical order.It looks like this: The joker record is not yet included.I open the query for editing (View/SQL view). I base my virtual record on another record, but I assign its values myself.Therefore my query returns an enlarged list.When using on a form, I set the default value of the dropdown list to 0.I set the dropdown’s update event that when it is set to 0 the filter omits this dropdown, and in all other cases it omits the selected one.I hope you liked this hint. I’ve already mentioned this on Twitter:
Access Excel VBA Blog » Excel spreadsheet and Access database development and VBA programming for Excel Power Users & Programmers
Programmez Office en VBA
Les premières leçons du cours VBA pour Excel ici NOUVEAU : Un didacticiel très complet qui vous permet de synthétiser plusieurs classeurs dans un classeur de consolidsation ! Idéal pour s'immerger dans VBA Excel quand on est débutant ! Vous êtes un utilisateur averti de Word et d'Excel ?Ces quelques modestes pages n'ont qu'un but : montrer quelques exemples de procédures Visual Basic Edition Applications pour Excel en anglais. Je suis un autodidacte qui a appris à programmer, pour les besoins de son travail, seul, face à son ordinateur et à se débrouiller. Je ne connaissais pas à l'époque l'excellent forum: microsoft.public.fr.excel (Microsoft a fermé définitivement le forum excel !) et la FAQ que je mets à jour régulièrement n'existait pas : FAQ du forum Excel Je suis presque...(!) toujours arrivé à faire ce que je voulais, parfois d'une façon très détournée «Genre midi à 14 heures» et pas très orthodoxe.

