Forms design

R

Ripper T

Hey, everybody,

I have two tables, one has two fields, inmate name and
inmate number. The other table contains 4 fields which
list the inmate number, sanction type, sanction start
date and sanction release date. I have created 2 forms
based upon these tables, the first of which is used to
enter inmate name and number, the second is opened from
within the first form via a command button "Enter
sanctions", with which the user can enter multiple
sanctions for each inmate entered in the first form.

1. How do I get the inmate number to already be in the
inmate number field of the second form when it is opened?

2. How can I enter multiple sanctions (records) for each
inmate and have them register before the inmate record is
actually recorded?

Thanx,

Rip
 
T

tina

1. the easiest way is to get rid of the command button. instead, put a
subform control in the first form, and set the control's SourceObject
property as the second form. set the LinkChildFields property to the second
form's inmate number field, and set the LinkMasterFields property to the
first form's inmate number field. each time you enter a sanction record, the
inmate number will be added automatically from the "parent" inmate record.

2. i don't think you can. from your description: there is a parent/child
(one-to-many) relationship between the inmates table and the inmate
sanctions table. the primary key of the inmates table is inmate number,
which is also the foreign key of the inmate sanctions table. why would you
want to enter an inmate sanction record for an inmate who does not yet exist
in the inmates table?

hth
 

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