none
What type of menu is this and how do you get it in access 2007 ?!?!? RRS feed

  • Question

  • Hi again,

    Wondering if anyone knows what type of menu this is and how to get it working in access 2007 forms??

    And when you click each title it minimises the other one and displays all the content in the one you clicked on??

    Really cant remember what its called, any help is appreciated :) thanks in advance

    Josh


    ...
    Thursday, October 13, 2011 2:34 PM

Answers

  • I think the most common and generic name is accordion. I don't know any for Access. So you need to search for an external Active X control.
    • Marked as answer by jmonkey51289 Thursday, October 13, 2011 3:54 PM
    Thursday, October 13, 2011 3:09 PM

All replies

  • I think the most common and generic name is accordion. I don't know any for Access. So you need to search for an external Active X control.
    • Marked as answer by jmonkey51289 Thursday, October 13, 2011 3:54 PM
    Thursday, October 13, 2011 3:09 PM
  • I think it's called an accordion, but I don't know how you would put it in access.
    For the benefit of others, please mark posts as answered or helpful when they answer or assist you in finding the answer. ___ "We came all this way to explore the Moon, and the most important thing is that we discovered the Earth." - Bill Anders, Apollo 8.
    Thursday, October 13, 2011 3:10 PM
  • Under WPF, that could be a Stack panel (vertical) holding five Expanders controls.

    Within Access, without code, the closest match I can think would be a tree control where you can expand five top level nodes, but the content of the expanded node area would be limited to other nodes.

    Thursday, October 13, 2011 3:25 PM
    Moderator
  • It is an  accordion thank you very much, I still havnt found a nice control but if I do I will post :)

     

    Thanks again,

    Josh


    ...
    Thursday, October 13, 2011 3:54 PM
  • you can emulate it with code, buttons, and textboxes, but it may be a little cumbersome.  Below is a sample of code that could be used there are 4 buttons and 4 text boxes cmd1 through cmd4 and txtItem1 through txtItem4.  All textboxes start out with a height of 0.  Set up the buttons like this with no spaces between them.  Modify the height of the buttons as you see fit.  I just made them all the same height.

    Button 1

    Text Box 1

    Button 2

    Text box 2

    Button 3

    Text box 3

    Button 4

    Text Box 4

    Attach this code

    Private Sub cmd1_Click()
       Me.txtItem1 = "This is the text for Item 1" & vbCrLf & "This is line 2 of item 1"
       Me.txtItem1.Height = 1200
       Me.txtItem1.Visible = True
       Me.txtItem2 = ""
       Me.txtItem2.Height = 0
       Me.txtItem2.Visible = False
       Me.txtItem3 = ""
       Me.txtItem3.Height = 0
       Me.txtItem3.Visible = False
       Me.txtItem4 = ""
       Me.txtItem4.Height = 0
       Me.txtItem4.Visible = False
       moveControls
    End Sub

    Private Sub cmd2_Click()
       Me.txtItem1 = ""
       Me.txtItem1.Height = 0
       Me.txtItem1.Visible = False
       Me.txtItem2 = "This is the text for Item 2" & vbCrLf & "This is line 2 of item 2"
       Me.txtItem2.Height = 1200
       Me.txtItem2.Visible = True
       Me.txtItem3 = ""
       Me.txtItem3.Height = 0
       Me.txtItem3.Visible = False
       Me.txtItem4 = ""
       Me.txtItem4.Visible = False
       Me.txtItem4.Height = 0
       moveControls
    End Sub

    Private Sub cmd3_Click()
       Me.txtItem1 = ""
       Me.txtItem1.Height = 0
       Me.txtItem1.Visible = False
       Me.txtItem2 = ""
       Me.txtItem2.Height = 0
       Me.txtItem2.Visible = False
       Me.txtItem3 = "This is the text for Item 3" & vbCrLf & "This is line 2 of item 3"
       Me.txtItem3.Height = 1200
       Me.txtItem3.Visible = True
       Me.txtItem4 = ""
       Me.txtItem4.Height = 0
       Me.txtItem4.Visible = False
       moveControls
    End Sub

    Private Sub cmd4_Click()
       Me.txtItem1 = ""
       Me.txtItem1.Height = 0
       Me.txtItem1.Visible = False
       Me.txtItem2 = ""
       Me.txtItem2.Height = 0
       Me.txtItem2.Visible = False
       Me.txtItem3 = ""
       Me.txtItem3.Height = 0
       Me.txtItem3.Visible = False
       Me.txtItem4 = "This is the text for Item 4" & vbCrLf & "This is line 2 of item 4"
       Me.txtItem4.Height = 1200
       Me.txtItem4.Visible = True
       moveControls
    End Sub

    Private Sub moveControls()
        Me.cmd2.Top = Me.cmd1.Top + Me.cmd1.Height + Me.txtItem1.Height
        Me.cmd3.Top = Me.cmd2.Top + Me.cmd2.Height + Me.txtItem2.Height
        Me.cmd4.Top = Me.cmd3.Top + Me.cmd3.Height + Me.txtItem3.Height
    End Sub


    For the benefit of others, please mark posts as answered or helpful when they answer or assist you in finding the answer. ___ "We came all this way to explore the Moon, and the most important thing is that we discovered the Earth." - Bill Anders, Apollo 8.
    • Edited by -suzyQ Thursday, October 13, 2011 4:58 PM
    Thursday, October 13, 2011 4:57 PM
  • You could further refine this by setting up variables with the heights of the filled text boxes and setting up a procedure in which you pass the number of which button was selected to determine which to show/hide, and you don't necessarily need to reset the contents of each text box.  with the visible property you control which message is seen and which isn't so you could set up the text boxes values (or make them labels and set up the captions) in the properties window

    For the benefit of others, please mark posts as answered or helpful when they answer or assist you in finding the answer. ___ "We came all this way to explore the Moon, and the most important thing is that we discovered the Earth." - Bill Anders, Apollo 8.
    • Edited by -suzyQ Thursday, October 13, 2011 6:17 PM
    Thursday, October 13, 2011 6:16 PM
  • Hi Josh,

    You have two options - if you want something fairly sophisticated you could use a FlexGrid ActiveX control although that would require a fair amount of code, see 

    http://www.rogersaccesslibrary.com/forum/flex-grid-demo_topic511&SID=2d65aeaf-aa36-24337e8d-16bc8689-8825z585.html 

    for some examples.

    You can also make a passable 'Accordion' type menu using just a sub-form. I have made up a demo DB (based on Northwind) which demonstrates the technique, if you would like a copy then just drop me an email.

    HTH

    Peter Hibbs.

     

     

    Friday, October 14, 2011 3:27 PM
  • Thanks for the reply however, I have moved passed the issue (used a different layout) is there anyway to close thread?? I feel kinda bad saying ive al ready found a way to people with great idea's??

     

    Thanks again,

    Josh


    ...
    Friday, October 14, 2011 3:42 PM
  • Don't worry about it.  Others will read the thread and get some new ideas, and it's good to know that you've found a solution.
    For the benefit of others, please mark posts as answered or helpful when they answer or assist you in finding the answer. ___ "We came all this way to explore the Moon, and the most important thing is that we discovered the Earth." - Bill Anders, Apollo 8.
    Friday, October 14, 2011 4:05 PM
  • Great then!! If I have any more questions ill know where to find answers :)

     


    ...
    Friday, October 14, 2011 4:15 PM
  • Hi Josh,

    No problem and good luck with your project.

    Peter Hibbs.

    Friday, October 14, 2011 5:05 PM
  • Peter  Do you stillhave example of your accordian?
    Friday, September 20, 2019 2:31 AM
  • Hi Robert,

    Yes I do, but I don't think I can upload a demo here.

    Send me an email at  peter dot hibbs @ btinternet dot com and I can send you a demo database.

    Peter Hibbs.


    • Edited by Peter Hibbs Friday, September 20, 2019 3:29 PM Spelling correction.
    Friday, September 20, 2019 11:41 AM
  • Do you stillhave example of your accordian?

    Hi Robert,

    If you like programming, you can make almost anything you want.

    I don't know what you want to show, and how, but using an unbound form you can get some very versatile results.
    As an example:

    Imb.

    Friday, September 20, 2019 10:46 PM