Confused with form_current

  • Thread starter Thread starter Dave Midgley
  • Start date Start date
D

Dave Midgley

Guest
I am a little confused as to when exactly the forms_current event is called.
I have a form with a text box called Last_Name, bound to the "Last Name" field in the form's table. I have the following code in the FormsCurrent event:
Dim test1, test2 As String
test1 = Me.recordset.Fields.item("Last Name").Value
test2 = Me.Last_Name.Value

Why is it that when I move from record to record in the form, when this event is called test2 contains the name in the current record, but test1 contains the name in the previous record?
 
These 2 things should result in the same value. Just to be sure, I tried it with your code, and they both produced the same value.
How are you changing the current record?
Do you get the disparity when you use the built-in nav buttons, or when you scroll the mouse wheel to navigate?
 
Very strange. I have no events on the textbox control, and the only other form event is Form_Open, so I can't think what could be making it behave so strangely.
I'm using the built-in nav buttons on the form to navigate (I didn't know you could scroll with the mouse wheel - it has no effect on mine). I'm using Access 2000 FYI.
 

Users who are viewing this thread

Back
Top Bottom