Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,152,689 members, 7,816,812 topics. Date: Friday, 03 May 2024 at 05:42 PM |
Nairaland Forum / Science/Technology / Programming / Help,how Do I Send Data From An Msaccess Table To A Label In My Vb6 Appl (2045 Views)
Login Code In Vb6.0 / Install Vb6 Application On Android / Help me convert this Vb6.0 code To Vb.net (2) (3) (4)
Help,how Do I Send Data From An Msaccess Table To A Label In My Vb6 Appl by howardm: 10:39pm On Nov 01, 2009 |
kindly assist, i enter the search criteria in a text box linked to a field(name of student) in the table i want to send data to a label linked to another field(age)from d table,such that once i click the get cmd button in my application the data i need corresponding to the search criteria entered in the txt box would appear, |
Re: Help,how Do I Send Data From An Msaccess Table To A Label In My Vb6 Appl by sweetpawn2: 7:55am On Nov 02, 2009 |
Put another textbox, label, and button on d form. Bind the label to the field you are searching on,eg. name. Do not bind the text box. Put this in button click event: data1.findfirst "name = "&text1.text Rem You can replace name with the fieldname of d D.B u are searching on. If data1.nomatch= true then msgbox " No Match Found!" End If Type your query in the textbox and click on the button. |
Re: Help,how Do I Send Data From An Msaccess Table To A Label In My Vb6 Appl by sweetpawn2: 7:55am On Nov 02, 2009 |
Put another textbox, label, and button on d form. Bind the label to the field you are searching on,eg. name. Do not bind the text box. Put this in button click event: data1.findfirst "name = "&text1.text Rem You can replace name with the fieldname of d D.B u are searching on. If data1.nomatch= true then msgbox " No Match Found!" End If Type your query in the textbox and click on the button. |
Re: Help,how Do I Send Data From An Msaccess Table To A Label In My Vb6 Appl by jek1471: 12:59pm On Nov 06, 2009 |
what method are you using to call ur database? Are u using the data control or calling the data from code? You need to code the cmd_click() procedure and provide and SQL such that when you click it, the SQL is invoked and seraches for the record in the database and display in the label. Example below: cmd_click() SQL="SELECT * from theDatabase WHERE [label]='"+ucase(trim(txtText.text))+"'" set rs=db.openrecordset(SQL) if rs.recordcount>0 then lblLabel.caption= rs!label end sub This may look complicated, let's discuss further - I'll explain |
Re: Help,how Do I Send Data From An Msaccess Table To A Label In My Vb6 Appl by dotzok: 1:40am On Nov 22, 2009 |
"what method are you using to call your database?" - jek1471. Excellent. that was the 1st question that came to ma mind. u can as well say rs.Find("SerialNo=' " & UCase(txtSearch.Text) & "'" theLabel.Caption = rs.Field("Fullname" or txtfullname.Text = rs.Field("Fullname" rs.Refresh . . . |
(1) (Reply)
Civic Innovation Lab: A Tech Hub In Wuse 2, Abuja. / IoT (internet Of Things) With ESP8266 / Why Is Web Development The Most Commonly Talked About Career In Nigerian Tech
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10 |