How would I code this?

Sorry for the poor title but I can better explain what I want to do here.

I have a method:

frmMain.bbMenuMain.AddPage("homepage","Home")

Which basically adds a row to my database table tblPages which has a key column which gets populated in this instance with homepage and a caption column which gets populated with Home. All very well and straight forward.

Next I have a method which adds and item to the page created above. I could add any number of items to the page created above, the way I do this is:

frmMain.bbMenuMain.AddMenuItem("homepage","contactspage","contactsmenuitem","Contacts")

This adds a menu item to “homepage” and has a target page of “contactspage” and the menu item has a key “contactsmenuitem” and a caption “Contacts”. These are stored in another table in my database tblMenuItems.

For the second method I would rather do something like this

frmMain.bbMenuMain.Pages("homepage").AddMenuItem(.....)

How would I code that?