₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,329,928 members, 8,443,019 topics. Date: Saturday, 11 July 2026 at 01:58 AM

Toggle theme

Assist Me With This Vb6 Code - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingAssist Me With This Vb6 Code (1474 Views)

1 Reply (Go Down)

Assist Me With This Vb6 Code by bigafees(op): 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(op): 11:42am On Mar 15, 2010
Thanx Man it work
Re: Assist Me With This Vb6 Code by bigafees(op): 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

Login Code In Vb6.0Install Vb6 Application On AndroidHelp me convert this Vb6.0 code To Vb.net234

Microsoft Makes ASP.NET MVC A Lot More OpenCode Breakers ChallengeOOP Encourages Artificial Relationships: making namespaces scriptable