is this possible

P

Phil

i wonder whether this is possible

i have a form [Events] which has a subform [WaitingList] this is based on a
query and is displayed in datasheet view with the following fields

AttendeeID
FirstName
LastName
EventID
Trust

could i click on one of the peoples name displayed in [WaitingList] and by
doing so open my [Attendees] form with that person details so as i can edit
their details

AttendeeID is the primary key for the attendee table which the Attendees
form is based on

i have no idea how to dothis but it would make my life so much easier

thanks for any help anyone can give me

Phil
 
T

TC

Not to answer your question, but: if AttendeeID is the primary key of
the Attendees table, a person could never attend more than one event!
Access would reject a second Attendees record for the same AttendeeID.

Instead, the two fields AttendeeID and EventID should together form a
so-called "composite" primary key. Then, a person can attend any number
of different events - because only the combination of attendee /and
eventid/ will need to be unique.

HTH,
TC [MVP Access]
 
O

Ofer

On the Double click event of the field, Id Or name, you can write the code to
open the form, Attendees, with the selected AttendeeID, using the
Wherecondition in the OnOpen form command line
========================================
Dim MyWhereCondition As String
MyWhereCondition = "AttendeeID = " & Me.[AttendeeID]
Docmd.OpenForm "Attendees",,,MyWhereCondition
========================================
If the AttendeeID field type is string, then use ths
MyWhereCondition = "AttendeeID = '" & Me.[AttendeeID] & "'"

Adding a single quote before and after
 
P

Phil

thank you for your response. i did not disclose my table structure fully. i
have no problems booking more than one person into an event, i have a
registration table which stores details of people booked on courses the
events table only stores details of the courses (starttime stop time
etc)thereby each attendeeID is unique

thanks again

Phil
 
P

Phil

that worked great thanks

Phil

Ofer said:
On the Double click event of the field, Id Or name, you can write the code to
open the form, Attendees, with the selected AttendeeID, using the
Wherecondition in the OnOpen form command line
========================================
Dim MyWhereCondition As String
MyWhereCondition = "AttendeeID = " & Me.[AttendeeID]
Docmd.OpenForm "Attendees",,,MyWhereCondition
========================================
If the AttendeeID field type is string, then use ths
MyWhereCondition = "AttendeeID = '" & Me.[AttendeeID] & "'"

Adding a single quote before and after
--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



Phil said:
i wonder whether this is possible

i have a form [Events] which has a subform [WaitingList] this is based on a
query and is displayed in datasheet view with the following fields

AttendeeID
FirstName
LastName
EventID
Trust

could i click on one of the peoples name displayed in [WaitingList] and by
doing so open my [Attendees] form with that person details so as i can edit
their details

AttendeeID is the primary key for the attendee table which the Attendees
form is based on

i have no idea how to dothis but it would make my life so much easier

thanks for any help anyone can give me

Phil
 

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