VBA MS Access Form Filter Example

This post is going to show you a ms access form filter sample.

The database I created only has one table called “Categories”.

We are going to have a form called “frmCategory”.

ms_access_form_filter_example_create_form

The form is going to be a “Split Form”, because that seems to be quicker than the “main form / sub form” setup.

The “Datasheet on Bottom” setting is set giving it this effect. Having this format, gives us this effect:

ms_access_form_filter_example_after_split_form

These are the settings for the “Split Form”

ms_access_form_filter_example_settings1

ms_access_form_filter_example_settings2

I reordered my fields so I can filter better (here is how it looks):

ms_access_form_filter_example_field_reorder

Here is my form all together:

ms_access_form_filter_example_after_update

…and here is my code:

The variable “m_Where” is where the filter string is stored, and has modular level scope, so the value persists while the form is open.

Let me know if you have any questions.

Free! Subscribe To Our YouTube Channel!

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather
Tags:




 

Call Erik Now