here is the code the ??????'s indicate where I need to put some additional code to make the sub continue finishing the second part. If I put Next it wants a For but not sure just what to do here any help would be really great
Thanks
Private Sub SSTab1_GotFocus()
On Error Resume Next
Dim objConn1
Dim i As Integer
i = 0
Set objConn1 = New ADODB.Connection
objConn1.ConnectionString = "DSN=eDoan;UID=sa"
objConn1.Open
Dim objRS1
Set objRS1 = objConn1.Execute("Select * from tblImages Where ClaimID = '" & frmImages.txtClaimNumber.Text & "'"
Dim MyPic As String
Dim MyPic2 As String
Do While objRS1.EOF <> True
MyPic = UCase(objRS1("Description")
If MyPic Like "*JPG" Or MyPic Like "*BMP" Or MyPic Like "*GIF" Then
Image1(i).Picture = LoadPicture(objRS1("Description")
Image1(i).Tag = objRS1("ID"
Check1(i).Value = objRS1("Checked"
Check2(i).Value = objRS1("CheckedS1"
Check3(i).Value = objRS1("CheckedS2"
i = i + 1
End If
objRS1.MoveNext
Loop
???????????????????????????????????????????
Do While objRS1.EOF <> True
MyPic2 = UCase(objRS1("Description")
If MyPic2 Like "*TIF" Or MyPic Like "*DOC" Or MyPic Like "*TXT" Or MyPic Like "*PDF" Then
Label18(i).Caption = (objRS1("Description")
Label18(i).Tag = objRS1("ID"
Check7(i).Value = objRS1("Checked"
Check8(i).Value = objRS1("CheckedS1"
Check9(i).Value = objRS1("CheckedS2"
i = i + 1
End If
objRS1.MoveNext
Loop
Set objRS1 = Nothing
objConn1.Close
Set objConn1 = Nothing
End Sub
Thanks
Private Sub SSTab1_GotFocus()
On Error Resume Next
Dim objConn1
Dim i As Integer
i = 0
Set objConn1 = New ADODB.Connection
objConn1.ConnectionString = "DSN=eDoan;UID=sa"
objConn1.Open
Dim objRS1
Set objRS1 = objConn1.Execute("Select * from tblImages Where ClaimID = '" & frmImages.txtClaimNumber.Text & "'"
Dim MyPic As String
Dim MyPic2 As String
Do While objRS1.EOF <> True
MyPic = UCase(objRS1("Description")
If MyPic Like "*JPG" Or MyPic Like "*BMP" Or MyPic Like "*GIF" Then
Image1(i).Picture = LoadPicture(objRS1("Description")
Image1(i).Tag = objRS1("ID"
Check1(i).Value = objRS1("Checked"
Check2(i).Value = objRS1("CheckedS1"
Check3(i).Value = objRS1("CheckedS2"
i = i + 1
End If
objRS1.MoveNext
Loop
???????????????????????????????????????????
Do While objRS1.EOF <> True
MyPic2 = UCase(objRS1("Description")
If MyPic2 Like "*TIF" Or MyPic Like "*DOC" Or MyPic Like "*TXT" Or MyPic Like "*PDF" Then
Label18(i).Caption = (objRS1("Description")
Label18(i).Tag = objRS1("ID"
Check7(i).Value = objRS1("Checked"
Check8(i).Value = objRS1("CheckedS1"
Check9(i).Value = objRS1("CheckedS2"
i = i + 1
End If
objRS1.MoveNext
Loop
Set objRS1 = Nothing
objConn1.Close
Set objConn1 = Nothing
End Sub