Link Forms

  • Thread starter Thread starter Ann Shaw
  • Start date Start date
A

Ann Shaw

I have a form that collects builder and site
information. I have a command button which lets me go to
another form to enter details of houses on these sites.

When I navigate or search for a particular builder or
site, I want to be able to click the command button and
have it bring me to the other form but on the same record
as the previous form. I need this in order to avoid
someone typing into the wrong record - also it will stop
the necessity to search for the builder again in the
other form.

Form 1 : contains builder name and info etc..
Form 2 : contains house information for that particular
builder or site.

Hope this is clear...!!!

Many thanks

Ann
 
There are several ways to do this.

1) You could set a parameter in the query feeding the second form that would
refer to the ID field of the record on the first form to limit the query to
only that record.

2) You could supply filter criteria (using the criteria in #1) in the
DoCmd.OpenForm call to filter the form when it opens.

3) You could have the second form check the ID field of the record in the
first form as it opens and use the Recordset object of the second form and
do a FindFirst to go to the correct record.

There are other ways if none of these work for you. It will depend on what
you want the resulting form to look like (i.e. whether or not you want to
limit it to ONLY the one record, just want to go to the record, or something
in between).
 
Thanks Wayne for such a quick response.

I would like to know which way you think is the easiest to
use. I just want to be able to go to the next form but be
on the same record so that I am inputting the correct
details to the correct record ...
what do you think and how would I do this very simply?


Thanks again.
 
I would probably use #1 and set the Window Mode argument in the call opening
the form to acDialog. This will make the form modal and the user will have
to close it again to continue.

If this is something they are going to be doing all the time, rather than
going back and forth between the forms, I'd consider placing the second form
on the first form as a subform.
 
Back
Top