M
Marco
Hi. I have this code in a combobox to find a record. This is automatically
generated from Access. It really works good. My problem is that my form that
has this combobox control is in a form that is a sub-form.
So when I open the form as mais form works ok, but if I open the form as a
sub-form it doesn't work.
What do I have to change in this code to make it work when is open has a
sub-form?
Private Sub Combo35_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID_Detalhes_Areas_Vistorias] = " & Str(Nz(Me![Combo35], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Regards,
Marco
generated from Access. It really works good. My problem is that my form that
has this combobox control is in a form that is a sub-form.
So when I open the form as mais form works ok, but if I open the form as a
sub-form it doesn't work.
What do I have to change in this code to make it work when is open has a
sub-form?
Private Sub Combo35_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID_Detalhes_Areas_Vistorias] = " & Str(Nz(Me![Combo35], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
Regards,
Marco