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.
 
G

Guest

Hi dee,

If you have a main form with subforms, setting the "link parent field" and
"link child field" in the form properties will handle this for you.

If there is no relationship between the data in the subforms and the parent
form, why are they in subforms?

Damian.
 
D

dee

Damian said:
Hi dee,

If you have a main form with subforms, setting the "link parent field" and
"link child field" in the form properties will handle this for you.

If there is no relationship between the data in the subforms and the parent
form, why are they in subforms?

Damian.
The Parent form only displays one record at a time. The
"FmSalesDispositionAll" form contains multiple records where a salesman
has quoted, but not sold. The sales manager can then double click the
ID number on one of those records of interest to him and see the rest
of that record on the parent form above.
 
G

Guest

Hi again,

Seems a strange way to go about it, but if it's working for you... Use the
recordsetclone functionality like this:

me.parent.form.recordsetclone.findfirst ("[ID] = " & me.ID)
me.parent.form.recordset.bookmark = me.parent.form.recordsetclone.bookmark

Hope this helps.

Damian.
 

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