G
Guest
I'm converting from a VBA environment. What event fires when the form is
loaded with the current record, similar to the form..current event in VBA?
I've got a vs project with an mdb that has the path for an image, along with
some other fields. When I open the project, the first record displays just
fine. But when I click on the "move next" button on the binding navigator,
the next record displays but the image doesn't change. When I debug the
code, the path is from the previous record. So it's always one record
behind. Here's a snippet of my code to explain what I mean. This code is in
the BindingNavigatorMoveNextItem_Click event:
If Me.txtImageFileName IsNot DBNull.Value Then
Me.PhotoOrImage.Image = Image.FromFile(Me.txtImageFileName.Text)
End If
txtImageFileName is the text box containing the path name and gets its value
from the mdb.
I assume I need to put this code in an event similar to form..current
instead of this one but I don't know which one that is.
loaded with the current record, similar to the form..current event in VBA?
I've got a vs project with an mdb that has the path for an image, along with
some other fields. When I open the project, the first record displays just
fine. But when I click on the "move next" button on the binding navigator,
the next record displays but the image doesn't change. When I debug the
code, the path is from the previous record. So it's always one record
behind. Here's a snippet of my code to explain what I mean. This code is in
the BindingNavigatorMoveNextItem_Click event:
If Me.txtImageFileName IsNot DBNull.Value Then
Me.PhotoOrImage.Image = Image.FromFile(Me.txtImageFileName.Text)
End If
txtImageFileName is the text box containing the path name and gets its value
from the mdb.
I assume I need to put this code in an event similar to form..current
instead of this one but I don't know which one that is.