I knew how to use combo box to read the database in Microsoft access, let say I have 7 option and I can make it into conbo box. But now I want the 7 option in the form of button (means got 7 button). Can anyone help ??

        While (acsdr.Read())
            ComboBox1.Items.Add(acsdr("tableno"))
        End While

Recommended Answers

All 5 Replies

I don't get you straight

Can you clarify what the button you want it to do and what are those 7 options and how you want to use them.

i mean the 7 option in combo box,if i double click the 5,then the text box will show the data in 5.
But now i would like to use the button instead the combo box. The 7 option will go into button,and click the button 5,will have same function with combo box.

You can add buttons dynamically and add handler with them to search the appropriate record from database.
The textproperty of the button should be acsdr("tableno").
After clicking the button, serch records on basis of the text property of the button or sender.
Hope it can help you.

ok,thank you !

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.