open bound form to specific record

V

vauneen

hi, i'm struggling to find out if there is a way for me to open a bound form
on a specific record.
i have a form bound to tbl:repairs, and when you click on a command on that
form, it opens a form bound to tbl:sitereports. is it possible for me to open
the 2nd form (frm:sitereports) on the entry for a specific report?
(tbl:repairs and tbl:sitereports are linked with a common id number)
i guess i need to hand the id number to frm:sitereports, or something like
that but i cant find how?
any help appreciated.
vauneen
 
J

John Vinson

is it possible for me to open
the 2nd form (frm:sitereports) on the entry for a specific report?

Yes. Edit the code which opens the form to pass the value of the ID:

DoCmd.OpenForm "sitereports", WhereCondition := "[ID] = " & Me!ID

The syntax will vary a bit - I don't know the name of your form's
textbox for the ID, for example.


John W. Vinson[MVP]
 
Top