• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

kod yardımı

Katılım
11 Ağustos 2005
Mesajlar
239
arkadaşlar hata nerede?



Private Sub GetData()
Dim MyDB As DAO.Database
Dim RS As DAO.Recordset
Dim RScount As Long

On Error GoTo ErrHandler:
Set MyDB = OpenDatabase(DBpath, False, False, "Excel 8.0")
Set RS = MyDB.OpenRecordset("select Isim, Soyad , Telefon ,from [Liste$] order by Isim")

With RS
.MoveLast
RScount = .RecordCount
.MoveFirst
End With


ListBox1.ColumnCount = RS.Fields.Count + 1
ListBox1.Column = RS.GetRows(RScount)



ErrHandler:
If RScount < 1 Then Exit Sub

RS.Close
MyDB.Close
Set RS = Nothing
Set MyDB = Nothing

End Sub
 
&#304;lk g&#246;ze &#231;arpan bu sat&#305;r..
Kod:
    Set RS = MyDB.OpenRecordset("select Isim, Soyad , Telefon [COLOR=Blue][B],[/B][/COLOR]from[Liste$] order by Isim")
Sat&#305;r&#305; a&#351;a&#287;&#305;daki gibi de&#287;i&#351;tirin.
Kod:
    Set RS = MyDB.OpenRecordset("select Isim, Soyad, Telefon from [Liste$] order by Isim")
 
Banada sanki Path tan&#305;mlanmam&#305;&#351; gibi geldi.:cool:
 
Modul d&#252;zeyinde sabit tan&#305;mlanm&#305;&#351; olabilir Evren hocam.
 
Geri
Üst