hi:
i have db with students table and a form that show picture of a student and author details
all the pictures are in a folder and i have a code that called the picture by file name etc'
now what i need is to which student is missing a picture
1. im getting error in half way
2 i want the results of the missing picture well go to a table
3 the result that i'm getting Looks like a mess
best regards
i have db with students table and a form that show picture of a student and author details
all the pictures are in a folder and i have a code that called the picture by file name etc'
now what i need is to which student is missing a picture
1. im getting error in half way
2 i want the results of the missing picture well go to a table
3 the result that i'm getting Looks like a mess
best regards
Code:
Private Sub btn_miss_Click()
Dim a As New FileSystemObject
Dim f As Folder
Dim s As String
Dim strFirstName As String
Dim strLastName As String
Dim strID As String
Dim strCity As String
Dim strStudentName As String
txtMiss.SetFocus
txtMiss.Text = ""
For i = 0 To lstNames.ListCount - 1
strID = lstNames.Column(0, i)
strFirstName = lstNames.Column(2, i)
strLastName = lstNames.Column(1, i)
strCity = lstNames.Column(3, i)
strStudentName = "D:\StudentsManager2\Pictures\" & strLastName & " " & strFirstName & " " & strCity & ".gif"
IsFileExsist = a.FileExists(strStudentName)
If Not IsFileExsist Then
strStudentName = "D:\StudentsManager2\Pictures\" & strLastName & " " & strFirstName & " " & strCity & ".gif"
IsFileExsist = a.FileExists(strStudentName)
If (Not IsFileExsist) Then
txtMiss = txtMiss.Text + strLastName & " " & strFirstName & " " & strCity + ", "
End If
End If
Next i
End Sub