Linking Forms & Subforms

G

Guest

Using Access 2003, I am setting up a database for work with a parent form for
employee details and a subform for payments. I set both up as forms then
using the instructions in Online Help made the payments form into a subform.
It appears on the page beautifully, both sections have their own record
counter etc. I have the employee number as the link - one to many. In the
employee details the employee number is the primary key and I have an auto
number as the primary key for payments. When I put an employee number in the
payments subform it rejects if I haven't created an employee record, which is
good. My problem is that the form and subform seem to run independently of
each other. When i start a new employee record by clicking to the next
number, the previous persons payment details remain and I have to go into
that section and click to next record. Because this is going to be used by
others I need it to be as simple as possible. How do I make it lock together
the employee details section and the payment details, so when I start a new
employee the payments record section is blank too. Whoever is showing in the
employee record should automatically link to the payments record. Sorry this
is so long winded! thanks for any assistance its much appreciated.
 
J

Joan Wild

Open the Employee details form in design view. Click once on the control
that holds the payments. Go to View, Properties and click on the Data tab.
The Link Master and Link Child properties need to be set. By the looks of
it Employee number needs to be set for each property. If you click on the
build button (...), Access will help you.
 

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