Find record on parent form

D

dee

I have a parent form called "FmLeads". It contains a numeric field
called "ID"
It also contains a 3 tab 'Tab Control'.

Each tab contains a subform. One of the subforms
"FmSalesDispositionAll" is a 'continuous forms' design, on which each
record contains a numeric field called "ID".

I need code for a 'On Dbl Cick' Event Procedure on the subform's
("FmSalesDispositionAll") ID field.
I want the user to be able to double click on one of the ID numbers,
which would then find and go to the matching record of the parent form
"FmLeads". This record always exists.

I'm a new to this and would really appreciate if someone could give me
the subroutine code.
 
M

Marshall Barton

dee said:
I have a parent form called "FmLeads". It contains a numeric field
called "ID"
It also contains a 3 tab 'Tab Control'.

Each tab contains a subform. One of the subforms
"FmSalesDispositionAll" is a 'continuous forms' design, on which each
record contains a numeric field called "ID".

I need code for a 'On Dbl Cick' Event Procedure on the subform's
("FmSalesDispositionAll") ID field.
I want the user to be able to double click on one of the ID numbers,
which would then find and go to the matching record of the parent form
"FmLeads". This record always exists.


Try this kind of thing:

If Me.Dirty Then Me.Dirty = False 'save if needed
With Parent.RecordsetClone
.FindFirst "ID = " & Me.ID
If Not .NoMatch Then
Parent.Bookmark = .Bookmark
End If
End With
 
D

dee

Marshall said:
Try this kind of thing:

If Me.Dirty Then Me.Dirty = False 'save if needed
With Parent.RecordsetClone
.FindFirst "ID = " & Me.ID
If Not .NoMatch Then
Parent.Bookmark = .Bookmark
End If
End With

Thank you very much. Works great
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top