Adding cascading menubar

Derek

Registered User.
Local time
Today, 10:16
Joined
May 4, 2010
Messages
234
Hi All

I have designed a homepage which has a sidebar (A subform with all the options / buttons on the homepage). There is one Admin Button and when the button is clicked then it opens up a new form with further options for Admin like 'User management', 'Status Control', 'Permission management' etc...

I am looking for an alternative to do it. Instead of opening a complete new form that will show various Admin options , having something like cascading menubar so when the users click on Admin then it shows all the Admin options.

Can this be done? Please see attached the screenshot the way I am doing at the moment .

Thanks
 

Attachments

you can use TabControl (with Style = None,) meaning the Tab is not showing.
when the user click on Admin, you show the tab of the Admin.

say the Admin tab is the second tab (tab control is zero based, so first tab = 0, second tab is 1)

Private sub admin_Click()
Me.tabCtl0.Value = 1
End Sub
 
Can we do something like displaying the different sub options using slow motion ?

SO when the user click on Admin then various sub options related to Admin will appear under it but with slow motion. ?? Please see attached screenshot for reference.
 

Attachments

Guys, Can this be done? displaying the buttons slowly one after another so the users can see the effect???
 
Not sure what effect you are going for... Something like having the buttons small then grow over a quarter second or such?

You can adjust width and height from event timer to get something like this to work, but having a static image as reference does not convey what your trying for.
 
As mark mentioned, use a timer event to do this.
Start with all buttons hidden and use a series of if...elseif... statements to show each item in turn.
Decide the timer interval remembering it's in milliseconds so 1 second =1000
 
Yes I exactly want to do this for the 5 buttons under Admin. Can you please help me with the code. So basically when I click on Admin button then the 5 options under it become visible one after another and grow slowly.

Not sure what effect you are going for... Something like having the buttons small then grow over a quarter second or such?

You can adjust width and height from event timer to get something like this to work, but having a static image as reference does not convey what your trying for.
 
I wouldn't have them become visible and grow using a timer event as I think it will be irritating for the end user. If you've ever sat through a PowerPoint presentation where every trick was used on a slide, you'll know what I mean

To make visible in turn...starting with all buttons hidden

Code:
Private Sub Form_Timer()

If Me.cmdButton1.Visible = False Then 
    Me.cmdButton1.Visible = True
ElseIf Me.cmdButton2.Visible = False Then 
    Me.cmdButton2.Visible = True
ElseIf Me.cmdButton3.Visible = False Then 
    Me.cmdButton3.Visible = True
ElseIf Me.cmdButton4.Visible = False Then 
    Me.cmdButton4.Visible = True
ElseIf Me.cmdButton5.Visible = False Then 
    Me.cmdButton5.Visible = True
End If

End Sub

Modify button names to suit your form

OR if your button have names like tglButton1 to tglButton5 then

Code:
Private Sub Form_Timer()

Dim I As Integer

For I = 1 to 5
   Me("tglButton" & I).Visible = True
Next

End Sub
 
Last edited:
if you are familiar on Shockwave Flash, you can do that with that tool.
 
whats Shockwave Flash? can you please help me with this?
 
Ridders, I have already used Form timer for marquee text . Can I use another form timer to make the buttons visible in turn? How would I distinguish two form timers then ?

I wouldn't have them become visible and grow using a timer event as I think it will be irritating for the end user. If you've ever sat through a PowerPoint presentation where every trick was used on a slide, you'll know what I mean

To make visible in turn...starting with all buttons hidden

Code:
Private Sub Form_Timer()

If Me.cmdButton1.Visible = False Then 
    Me.cmdButton1.Visible = True
ElseIf Me.cmdButton2.Visible = False Then 
    Me.cmdButton2.Visible = True
ElseIf Me.cmdButton3.Visible = False Then 
    Me.cmdButton3.Visible = True
ElseIf Me.cmdButton4.Visible = False Then 
    Me.cmdButton4.Visible = True
ElseIf Me.cmdButton5.Visible = False Then 
    Me.cmdButton5.Visible = True
End If

End Sub

Modify button names to suit your form

OR if your button have names like tglButton1 to tglButton5 then

Code:
Private Sub Form_Timer()

Dim I As Integer

For I = 1 to 5
   Me("tglButton" & I).Visible = True
Next

End Sub
 
So you want marquee scrolling text, buttons appearing in turn and (possibly) growing slowly. Overkill?

Anyway, you can only have one form timer event on a form
If the timer interval can be the same for buttons & scrolling text - no problem
If not, you'll need to use a counter so one event only triggers on some timer events

e.g. use 1000 for buttons & 500 for scrolling text
Have an integer value N and set N=N+1 every time the timer runs
Only run the button code every other time

Code:
Private Sub Form_Timer()

Dim N As Integer

...marquee text code here

N= N+1

If N Mod 2 = 0 Then
    If Me.cmdButton1.Visible = False Then 
           Me.cmdButton1.Visible = True
    ElseIf Me.cmdButton2.Visible = False Then 
           Me.cmdButton2.Visible = True
    ElseIf Me.cmdButton3.Visible = False Then 
           Me.cmdButton3.Visible = True
    ElseIf Me.cmdButton4.Visible = False Then 
           Me.cmdButton4.Visible = True
    ElseIf Me.cmdButton5.Visible = False Then 
           Me.cmdButton5.Visible = True
    End If
End If

End Sub

Are you sure you don't want the buttons to flash on & off a few times as well!? :D
 
As opposed to trying to explain it, please look at the attached and let us know if this is what you are looking for.
 

Attachments

Users who are viewing this thread

Back
Top Bottom