Lethal
Oct 30th, 2000, 11:12 AM
i have a text box holding the invoice #. A text box holding the image path and a list box holding the invoice numbers. when i scroll throught the database using the adodc, the invoice picture changes, but when i click on the invoice # from the list box, nothing happens. There seems that there should be a way for the image to refresh, i tried using the refresh method, didn't work. thanks in advance:
Private Sub cmdNext_Click()
On Error GoTo HandleErrors:
ImgEdit1.Zoom = 25
adInvoices.Recordset.MoveNext
ImgEdit1.Image = txtFields(3).Text
ImgEdit1.Display
ImgEdit1.Refresh
Exit Sub
HandleErrors:
ImgEdit1.DisplayBlankImage 1400, 1140, 600, 400, 1
Label1.Visible = True
'Adodc1.Recordset.Delete
adInvoices.Recordset.MoveNext
End Sub
Private Sub cmdPrior_Click()
On Error GoTo HandleErrors:
ImgEdit1.Zoom = 25
adInvoices.Recordset.MovePrevious
ImgEdit1.Image = txtFields(3).Text
ImgEdit1.Display
ImgEdit1.Refresh
Exit Sub
HandleErrors:
ImgEdit1.DisplayBlankImage 1400, 1140, 600, 400, 1
Label1.Visible = True
'Adodc1.Recordset.Delete
adInvoices.Recordset.MoveNext
End Sub
Private Sub DataList1_Click()
txtFields(1).Text = DataList1.Text
txtFields(3).Text = adInvoices.Recordset!ImagePath
ImgEdit1.Image = txtFields(3).Text
ImgEdit1.Display
ImgEdit1.Refresh
Exit Sub
End Sub
Private Sub Form_Load()
adInvoices.Recordset.MoveFirst
ImgEdit1.Image = txtFields(3).Text
ImgEdit1.Display
fraInvoice.Caption = "Invoice Numbers: " & adInvoices.Recordset.RecordCount & " Records found"
End Sub
Private Sub ImgEdit1_SelectionRectDrawn(ByVal Left As Long, ByVal Top As Long, ByVal Width As Long, ByVal Height As Long)
ImgEdit1.ZoomToSelection
End Sub
Private Sub cmdNext_Click()
On Error GoTo HandleErrors:
ImgEdit1.Zoom = 25
adInvoices.Recordset.MoveNext
ImgEdit1.Image = txtFields(3).Text
ImgEdit1.Display
ImgEdit1.Refresh
Exit Sub
HandleErrors:
ImgEdit1.DisplayBlankImage 1400, 1140, 600, 400, 1
Label1.Visible = True
'Adodc1.Recordset.Delete
adInvoices.Recordset.MoveNext
End Sub
Private Sub cmdPrior_Click()
On Error GoTo HandleErrors:
ImgEdit1.Zoom = 25
adInvoices.Recordset.MovePrevious
ImgEdit1.Image = txtFields(3).Text
ImgEdit1.Display
ImgEdit1.Refresh
Exit Sub
HandleErrors:
ImgEdit1.DisplayBlankImage 1400, 1140, 600, 400, 1
Label1.Visible = True
'Adodc1.Recordset.Delete
adInvoices.Recordset.MoveNext
End Sub
Private Sub DataList1_Click()
txtFields(1).Text = DataList1.Text
txtFields(3).Text = adInvoices.Recordset!ImagePath
ImgEdit1.Image = txtFields(3).Text
ImgEdit1.Display
ImgEdit1.Refresh
Exit Sub
End Sub
Private Sub Form_Load()
adInvoices.Recordset.MoveFirst
ImgEdit1.Image = txtFields(3).Text
ImgEdit1.Display
fraInvoice.Caption = "Invoice Numbers: " & adInvoices.Recordset.RecordCount & " Records found"
End Sub
Private Sub ImgEdit1_SelectionRectDrawn(ByVal Left As Long, ByVal Top As Long, ByVal Width As Long, ByVal Height As Long)
ImgEdit1.ZoomToSelection
End Sub