Hi! How can I build a menu based on a adodb.recordset? Thanks
You have to create a control array menu and add to it. The code would look like this: vb Code: For x = 1 To 5 Load mnuDynamic(mnuDynamic.UBound + 1) With mnuDynamic(mnuDynamic.UBound) .Caption = "Item #" & x .Enabled = True .Visible = True End With Next You would just need to substitute your recordset for the static For...Next value.
For x = 1 To 5 Load mnuDynamic(mnuDynamic.UBound + 1) With mnuDynamic(mnuDynamic.UBound) .Caption = "Item #" & x .Enabled = True .Visible = True End With Next
Thanks. That really worked very well.
Forum Rules