Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Expand Or Collapse form footer

Expand Or Collapse form footer

Expand Or Collapse form footer

Hello, I have been trying to figure out how to get my switchboards(frm_Switchboard) form footer to expand or collapse based on Yes/No field in table (tbl_MenuItems). If I select an option that requires a start and end then collapse the footer and once dates are entered select the button again and it will open either the Form, Report ect and collapse the footer again. Can someone please take a look and see how I can do this?

I have a example button on the (frm_Switchboard) header that collapses and expands the footer I just need it to do it automatically based on the (tbl_MenuItems) field.


RE: Expand Or Collapse form footer

Well you've pretty much already got the code you need for this in cmdToggleFooter_Click(). You just need aminor modification and stick something like the following after opening the recordset in HandleButtonClick

So, after

rs.Open stSql, con, 1


If rs![ExpandFooter] = True Then
    cmdToggleFooter.Caption = "Collapse"
    cmdToggleFooter.Caption = "Expand"
End If 

RE: Expand Or Collapse form footer

Thanks again stronm I wouldn't have guessed that's how/where!!!! I had to change it a little to get to work correctly.

CODE -->

'Expand or Collaps footer based on tbl_MenuItems field: ExpandFooter
    If rs![ExpandFooter] = False Then
       If cmdToggleFooter.Caption = "Collapse" Then
        cmdToggleFooter.Caption = "Expand"
        End If
    ElseIf rs![ExpandFooter] = True Then
        cmdToggleFooter.Caption = "Collapse"
    End If 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close