listfields and access database in VB

Started by
-1 comments, last by Niux 18 years, 8 months ago
hey! - i dont know if i put this the wrong place, if so - sorry! (i tried to post it on programmersheaven.com in the VB forum, but their AI script decited that i wasnt allowed to post if - no reason given - how lame is that?) in my program i got a list1 witch displays all the records in my DB. now what i need to do is, when i click on a object in the list1 the program should seach the database for the matching object and get info from one of the fields in the table. problem is i cant figure out a way to do it, properly because my knowlage of databases is pretty poor. its an access DB, if that matters. i got this: Private Sub List1_Click() If Data1.Recordset("GotIt") = False Then // *1 Label4.BackColor = "&H000000FF&" Else Label4.BackColor = "&H0000FF00&" End If End Sub *1: meant to check the GotIt field - but it doesnt get anyinfo on the object to search for. it cant use the listindex to find the entry in the DB, cuz ill be sorting the list and not the DB. i guess what im looking for is something like a search fucktion, maybe like: get the list text value find it in the DB read GotIt field and set variable to GotIt fields value. check if variable value is false then do this else do that end i dont know, hope some of you can help me! thanks - niux

This topic is closed to new replies.

Advertisement