i have a btn_menu where it will add dynamically a group of buttons depending on the menu name (once adding the button the buttontext(menuName) is automatically addded).. and those added button (programmatically) have an event "addhandler" where I input the series of codes to retrieve data from the database (ms access) using the button.text. what my problem is i dont know how i can get the button.text.
the button.text that always shows is the last button that was added dynamically.
aconn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & Application.StartupPath & "\MENU.accdb;"
aconn.Open()
fil = ("select * from MENU_Items where MenuName='" & button.Text & "'")