Results 1 to 3 of 3

Thread: [RESOLVED] Dynamic Menu

  1. #1

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    Resolved [RESOLVED] Dynamic Menu

    Hi!
    How can I build a menu based on a adodb.recordset?
    Thanks

  2. #2
    Fanatic Member bgmacaw's Avatar
    Join Date
    Mar 2007
    Location
    Atlanta, GA USA
    Posts
    524

    Re: Dynamic Menu

    You have to create a control array menu and add to it. The code would look like this:

    vb Code:
    1. For x = 1 To 5
    2.         Load mnuDynamic(mnuDynamic.UBound + 1)
    3.         With mnuDynamic(mnuDynamic.UBound)
    4.             .Caption = "Item #" & x
    5.             .Enabled = True
    6.             .Visible = True
    7.         End With
    8.     Next

    You would just need to substitute your recordset for the static For...Next value.

  3. #3

    Thread Starter
    Hyperactive Member RS_Arm's Avatar
    Join Date
    Mar 2007
    Location
    Planet Earth
    Posts
    282

    Re: Dynamic Menu

    Thanks. That really worked very well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width