Let, i have a database in ms access with two field named-"name" & "roll". I also have a combo box or list box in vb containing those names. I have to select a name from that list and appear the corresponding "roll" from that database in a text box in vb form. How can i do it?
shahriar2403
0
Light Poster
Recommended Answers
Jump to Postu need to first open the database and assign its table's contents to a recordset object. all these u have to do in form_load event. try this code snippet :-
'in general section
dim db as database,rs as recordset'in form_load event
set db=opendatabase(app.path & "\yourdbname.mdb")
set rs=db.openrecordset("yourtablename",dbopentable)
…
All 2 Replies
Reply to this topic
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.