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?
Jump to Post
u 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")
All 2 Replies
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.