P
pampas
Hello,
I am trying to keep focus in a specific record in
frmDetalheMovFinanc , and it works fine if i set breakpoints in my
code. But when I clear all break points, it moves focus in that
subform to another record
Can you help me
Thanks
Carlos
Code that I have in the OnCurrent event of my form
On Error Resume Next
If Not IsNull(Me.OpenArgs) Then
Dim pass
Dim frm As Form
pass = Me.OpenArgs
pass = Eval(pass) ' if i dont do this it reads a string
Set frm = Forms![frmMovFinanc]![frmDetalheMovFinanc].Form
frm.Requery ' if i put a break point here the code works fine and when
the form opens in the desired record
With frm.RecordsetClone
If .RecordCount > 0 Then
.FindFirst "DetalheMovID =" & pass
frm.Bookmark = .Bookmark
End If
End With
Set frm = Nothing
End If
I am trying to keep focus in a specific record in
frmDetalheMovFinanc , and it works fine if i set breakpoints in my
code. But when I clear all break points, it moves focus in that
subform to another record
Can you help me
Thanks
Carlos
Code that I have in the OnCurrent event of my form
On Error Resume Next
If Not IsNull(Me.OpenArgs) Then
Dim pass
Dim frm As Form
pass = Me.OpenArgs
pass = Eval(pass) ' if i dont do this it reads a string
Set frm = Forms![frmMovFinanc]![frmDetalheMovFinanc].Form
frm.Requery ' if i put a break point here the code works fine and when
the form opens in the desired record
With frm.RecordsetClone
If .RecordCount > 0 Then
.FindFirst "DetalheMovID =" & pass
frm.Bookmark = .Bookmark
End If
End With
Set frm = Nothing
End If