jkserial
12-23-2004, 12:45 PM
What I am doing is using a query to get specific data from the db and then have the first and last names (each are seperate fields in db) display in the list box. I do not know how to go about doing this, please help?
Display Data From DB To List Box?jkserial 12-23-2004, 12:45 PM What I am doing is using a query to get specific data from the db and then have the first and last names (each are seperate fields in db) display in the list box. I do not know how to go about doing this, please help? TopCat 12-24-2004, 02:19 AM Have a look at my replie for Jonathan_Bs post 'Searching' this should answer all of your questions :) Zero Ice 12-26-2004, 09:31 AM What I am doing is using a query to get specific data from the db and then have the first and last names (each are seperate fields in db) display in the list box. I do not know how to go about doing this, please help? I assume you got RC as your recordset variable ( ADO Version ) Function GET_REC(ByVal Table_Name$,ByVal s_Criteria$,ByVal sIndx$) RC.Open "SELECT * FROM [" & Table_Name & "] WHERE [" & sIndx & "]='" & s_Criteria & "'" If Not RC.EOF Then '// we found the target '// fill up the listbox List1.Additem RC!First_Name & VbTab & RC!Last_Name End If Set RC = Nothing '// Nill '//Using Code : GET_REC "Table1",txtSearch,"Primary Key Of Yours" End Function Happy coding, bye . . . :D |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum