I have a question. I want to able to search for a record in a form using VBA.
I've constructed the following while loop:
Sub SelectCurrentBeg(dBegid As Double)
Dim temp As Double
temp = Begid.Value
While temp <> dBegid
DoCmd.GoToRecord , , acNext
temp = Begid.Value
Wend
End Sub
Now the Begid.Value is a editbox on the form bound to a field in a table. The thing is, the value which the compiler returns from the editbox is always the same. Where on the form i see the value change everytime i go to a next record.
I've also tried repainting the form on every new record, but for some reason i always end up with the same value
What am I doing wrong??
Regards,
Ted de Vries
I've constructed the following while loop:
Sub SelectCurrentBeg(dBegid As Double)
Dim temp As Double
temp = Begid.Value
While temp <> dBegid
DoCmd.GoToRecord , , acNext
temp = Begid.Value
Wend
End Sub
Now the Begid.Value is a editbox on the form bound to a field in a table. The thing is, the value which the compiler returns from the editbox is always the same. Where on the form i see the value change everytime i go to a next record.
I've also tried repainting the form on every new record, but for some reason i always end up with the same value

What am I doing wrong??
Regards,
Ted de Vries