MS Access – Sliding/Shutter Subform Example

I was looking for a simple way to reproduce a web style expandable sidebar (accordian subform, expandable subform, sliding subform, shutter subform, or whatever name you’d like to use to describe it in MS Access), instead of merely making a subform visible/invisible. The attached file, does exactly that and with a single change to a constant variable you can control the speed of the shutter/slider.

This is a very crude example to illustrate the principle.  You can use any subform you like, within any form you’d like.  There are no requirements to make this work and all the code is native MS Access code, no external references, or ActiveX Controls.  The button used to expand and retract the subform can also be changed as you see fit, it is just a question of placing the brief code behind whatever button you select to use in your design.

Just another nifty method to add a little wow factor to a form.

Disclaimer/Notes:

If you do not have Microsoft Access, simply download and install the freely available runtime version (this permits running MS Access databases, but not modifying their design):

Microsoft Access 2010 Runtime
Microsoft Access 2013 Runtime
Microsoft Access 2016 Runtime
Microsoft 365 Access Runtime

All code samples, download samples, links, ... on this site are provided 'AS IS'.

In no event will Devhut.net or CARDA Consultants Inc. be liable to the client/end-user or any third party for any damages, including any lost profits, lost savings or other incidental, consequential or special damages arising out of the operation of or inability to operate the software which CARDA Consultants Inc. has provided, even if CARDA Consultants Inc. has been advised of the possibility of such damages.

Download a Demo Database

Feel free to download a 100% unlocked demo copy by using the link provided below:

Download “Slider/Shutter Demo” Subform_SlidderShutter_Sample_Database.zip – Downloaded 8516 times – 33.88 KB

Version History

Version Date Changes
V1.000 2012-06-09 Initial Public Release – Right to Left Slider example
V1.001 2017-12-12 Added a Bottom to Top Slider example
V1.002 2022-09-27 Added a Left to Right Slider example

10 responses on “MS Access – Sliding/Shutter Subform Example

  1. Brandon Kibbler

    I'd been previously looking high and low for a method of doing exactly this in my app, but could never find an example.  I was delighted today to come across your site and discover this sample.  It is a very nice demonstration and I was quickly able to integrate it into my app.  Thank you for sharing.

  2. Frank Koster

    Very nice example.
    With a little tweak it can also be used onmouseover event, that way you can create a website-like navigation with sub items in a dropdown list style.

  3. Steffan

    Solutions for the flicker on a fairly large form? On my main form I have a multi column listbox. When the drawer slides out it looks fine but once the animation finishes, the listbox from behind covers part of the subform. Suggestions?

  4. Eric

    Sorry but it appears that the link is broken. I’d love to have a look at the code. Is it still possible to get the download?

  5. Ihsan

    very nice work. thank you. This is very old post, I hope @Daniel Pineault is available.
    I could not figure it out, if the button is on Mainform instead of subform. I want button on mainform which should work expanding and collapsing of subform. For example user will click add record, edit record etc button, the respective subform slide over there. (up-down, or right left). How should I modify code?

  6. Abu Sahama

    A very nice work with small code.
    The frm_Main_sfrm is now expending from right to left. But I need to expand the from left to right. How can I do this. Would you like to help please?

      1. Abu Sahama

        Thank you for your quick reply with a link. I have got the exact example which I was looking for. Thank you again and wishing your best of luck.