Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,143,346 members, 7,780,923 topics. Date: Friday, 29 March 2024 at 05:34 AM

Assist Me With This Vb6 Code - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Assist Me With This Vb6 Code (1398 Views)

Login Code In Vb6.0 / Install Vb6 Application On Android / Help me convert this Vb6.0 code To Vb.net (2) (3) (4)

(1) (Reply) (Go Down)

Assist Me With This Vb6 Code by bigafees: 4:06pm On Mar 12, 2010
i want my combo box to be seen data/record from another table, it work but only seen the first record in the table & not the whole record
See the code below



Private Sub Form_Load()
Dim con As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim Rs As New ADODB.Recordset

con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Air Plane\Airline.mdb;Persist Security Info=False"
con.Open ' myRecSet.Open
'cmd.ActiveConnection = con
cmd.CommandText = "Select * from addrecord"
Rs.Open "Select * from addrecord", con, adOpenDynamic, adLockOptimistic
' Set RecSet = cmd.Execute
With Rs '
combo1.AddItem !From
End With
Re: Assist Me With This Vb6 Code by luckyCO(m): 11:22pm On Mar 12, 2010
bigafees:

i want my combo box to be seen data/record from another table, it work but only seen the first record in the table & not the whole record
See the code below



Private Sub Form_Load()
Dim con As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim Rs As New ADODB.Recordset

con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Air Plane\Airline.mdb;Persist Security Info=False"
con.Open ' myRecSet.Open
'cmd.ActiveConnection = con
cmd.CommandText = "Select * from addrecord"
Rs.Open "Select * from addrecord", con, adOpenDynamic, adLockOptimistic
' Set RecSet = cmd.Execute
With Rs '
combo1.AddItem !From
End With

DO WHILE NOT RS.EOF
combo1.AddItem !From
RS.MOVENEXT
LOOP
Re: Assist Me With This Vb6 Code by bigafees: 11:42am On Mar 15, 2010
Thanx Man it work
Re: Assist Me With This Vb6 Code by bigafees: 12:23pm On Mar 15, 2010
@ LuckyCo, Please Assist me on this also

I want to save picture in my Ms-Access,

.Fields("FOTO"wink = img2.Picture

save correctly, but if i now search/retrieve for that person record to bring his picture maybe for Editing or something else, the following line of code gives error:


img2=!foto

pls help again
Re: Assist Me With This Vb6 Code by sweetpawn2: 3:28pm On Mar 15, 2010
Hi bigafees,
You don't have to save the image file in the access database, instead, you save the image file in a folder you will create for staring the images. What you store in the database is the name of the file name image . Once you want to access the image , you retrieve the file name from the database and use the picture box 'load picture' method to view the image.

(1) (Reply)

Why Is My Website Moving Slow? / Retrieving Code For Visual Basic 6.0 / Quotes Needed For Website Development

(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. 11
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.