K
kheisler6
I'm working on a database that holds information on perpetrators of
child abuse. Perpetrators are stored in tblPerps; victims are stored in
tblVictims. Because a perp can have many victims, and a victim can have
many perps, I also have a junction table: tblPerpsVictims.
After a user enters a perpetrator on the main form (frmPerps), I'd
like him to be able to assign any number of victims using a continuous
subform (fsubVictims, based on tblPerpsVictims). On the subform, the
user should be able to either select from a list of existing victims,
add a new victim, or both. I realize that the easiest way would be to
have a combo box on the subform (where he can select a victim from
tblVictims) with a NotInList event (so he can add a new victim). But
for a variety of reasons, I'd like to use a different interface:
1. The new record of the subform should have a default
'value'/hyperlink which reads "Assign new victim."
- e.g.: http://img516.imageshack.us/my.php?image=victim1ll1.jpg
2. Clicking this will call a pop-up expanding search form where the
user can search to see if the victim has already been entered.
- e.g.: http://img512.imageshack.us/my.php?image=searchvj0.jpg
3. If a match is found, he selects the victim, clicks an "Assign
victim to perp" button, and the victim is entered into
tblPerpsVictims (and the subform is updated).
- The subform would then look like this:
http://img512.imageshack.us/my.php?image=victim2dq4.jpg
4. If the victim he needs to assign has not already been entered in the
database, he clicks an "Add new victim" button on the search form,
enters the victim info. in a form that pops-up, closes the form, and
the victim is entered into tblVictims, tblPerpVictims (and the subform
is updated).
###
I'm having trouble with #1 - setting the default 'value' of a
new record on the continuous subform to be a hyperlink (or label with
OnClick code), which can call the search form. This seems like an easy
task but I'm not sure how to proceed.
And once a victim is selected in the search form, would using a SQL
Insert command be the best way to assign that person to tblPerpsVictim?
Thanks for any pointers.
Kurt
child abuse. Perpetrators are stored in tblPerps; victims are stored in
tblVictims. Because a perp can have many victims, and a victim can have
many perps, I also have a junction table: tblPerpsVictims.
After a user enters a perpetrator on the main form (frmPerps), I'd
like him to be able to assign any number of victims using a continuous
subform (fsubVictims, based on tblPerpsVictims). On the subform, the
user should be able to either select from a list of existing victims,
add a new victim, or both. I realize that the easiest way would be to
have a combo box on the subform (where he can select a victim from
tblVictims) with a NotInList event (so he can add a new victim). But
for a variety of reasons, I'd like to use a different interface:
1. The new record of the subform should have a default
'value'/hyperlink which reads "Assign new victim."
- e.g.: http://img516.imageshack.us/my.php?image=victim1ll1.jpg
2. Clicking this will call a pop-up expanding search form where the
user can search to see if the victim has already been entered.
- e.g.: http://img512.imageshack.us/my.php?image=searchvj0.jpg
3. If a match is found, he selects the victim, clicks an "Assign
victim to perp" button, and the victim is entered into
tblPerpsVictims (and the subform is updated).
- The subform would then look like this:
http://img512.imageshack.us/my.php?image=victim2dq4.jpg
4. If the victim he needs to assign has not already been entered in the
database, he clicks an "Add new victim" button on the search form,
enters the victim info. in a form that pops-up, closes the form, and
the victim is entered into tblVictims, tblPerpVictims (and the subform
is updated).
###
I'm having trouble with #1 - setting the default 'value' of a
new record on the continuous subform to be a hyperlink (or label with
OnClick code), which can call the search form. This seems like an easy
task but I'm not sure how to proceed.
And once a victim is selected in the search form, would using a SQL
Insert command be the best way to assign that person to tblPerpsVictim?
Thanks for any pointers.
Kurt