K
Kathy R.
I would like my user to be able to add those attending an event to a
subform by doubleclicking a member in a listbox on the main form.
Main form (frmAttendance) shows event information
EventName, EventDate, from tblEvent
and MemberList - an unbound listbox which includes IndID and LastName
from tblIndividual
Subform (sfrAttendee) is a continuous form showing which individuals
(AtIndID, LastName) are attending that particular event. Master/Child
link is EventID/AtEventID. Record source is qryAttendance which
includes tblIndividual and tblAttendance.
The form/subform is working. What I need help with is the code to put
in the doubleclick event to enter the IndID (first column in the unbound
listbox) into the AtIndID field in the subform, and then have the
subform update that record and move to the next blank row in the
continuous form.
The listbox is actually based on a SQL statement with a custom sort
order, but I figured I’d start with baby steps using just the basic
fields so that I can actually see how it works, before I muck it up with
something more complicated. Thank you in advance for your help. I
really appreciate all the help that you folks “in the know” devote to
these forums!
Kathy R.
Tables used:
tblIndividual
IndID (primary key, autonumber)
LastName
tblAttendance
AttendID (primary key, autonumber)
AtIndID (foreign key)
AtEventID (foreign key)
tblEvent
EventID (primary key, autonumber)
EventName
EventDate
one Individual can attend many Events
one Event can have many Individuals attending
subform by doubleclicking a member in a listbox on the main form.
Main form (frmAttendance) shows event information
EventName, EventDate, from tblEvent
and MemberList - an unbound listbox which includes IndID and LastName
from tblIndividual
Subform (sfrAttendee) is a continuous form showing which individuals
(AtIndID, LastName) are attending that particular event. Master/Child
link is EventID/AtEventID. Record source is qryAttendance which
includes tblIndividual and tblAttendance.
The form/subform is working. What I need help with is the code to put
in the doubleclick event to enter the IndID (first column in the unbound
listbox) into the AtIndID field in the subform, and then have the
subform update that record and move to the next blank row in the
continuous form.
The listbox is actually based on a SQL statement with a custom sort
order, but I figured I’d start with baby steps using just the basic
fields so that I can actually see how it works, before I muck it up with
something more complicated. Thank you in advance for your help. I
really appreciate all the help that you folks “in the know” devote to
these forums!
Kathy R.
Tables used:
tblIndividual
IndID (primary key, autonumber)
LastName
tblAttendance
AttendID (primary key, autonumber)
AtIndID (foreign key)
AtEventID (foreign key)
tblEvent
EventID (primary key, autonumber)
EventName
EventDate
one Individual can attend many Events
one Event can have many Individuals attending