S
Spimby
Hi....
I'm building a database with junction tables and I'm having a problem I
run into _every_time_ I build an Access database. I'm relatively new
to Access. I understand the use of junction tables, however I clearly
don't understand using queries to pull the data together.
Here's my situation:
Tables:
tblConference
tblPartcipants
(junction) tblConferencepartipants
The primary form is the "conference" form (frmConference). I want to
make it so that I can have the participants appear on the conference
form as a subform. So at the top, I'd have conference details and on
the bottom, I'd have the participant details. The participant table
has a unique participant ID (primary key, autonumber), the conference
table has a unique "Conference ID" (primary key, autonumber) and the
Junction table has it's own primary key (autonumber), as well as
numeric fields for the primary keys from the other two tables. What
I've been doing is creating a query for the sub report
(qryConferenceParticiants) and basing the subform on that.
The query pulls the confrenceID from the tblConference, the
PartcipantID from the tblParticipants and all the detail fields from
tblParticipatns I need (Name, employee ID, etc). I also pull the
Junction table primary key as well (autonumber).
This usually does not work. When I put the subform into the main form
and I click in it, I get the message:
"You tried to assign the Null value to a variable that is not a Variant
data type. (Error 3162)"
The bottom line is, I'm not sure which keys to pull and from where.
Should the conferenceID key come from the tblConfrence or the junction
table? The ParticipantID from the tbl Participants or the Junction
table? (by the way, the primary form is based on a query {just one
table} as well, not sure if that's an issue)
Thanks for (any) help on this. I'm lost.
Spimby
I'm building a database with junction tables and I'm having a problem I
run into _every_time_ I build an Access database. I'm relatively new
to Access. I understand the use of junction tables, however I clearly
don't understand using queries to pull the data together.
Here's my situation:
Tables:
tblConference
tblPartcipants
(junction) tblConferencepartipants
The primary form is the "conference" form (frmConference). I want to
make it so that I can have the participants appear on the conference
form as a subform. So at the top, I'd have conference details and on
the bottom, I'd have the participant details. The participant table
has a unique participant ID (primary key, autonumber), the conference
table has a unique "Conference ID" (primary key, autonumber) and the
Junction table has it's own primary key (autonumber), as well as
numeric fields for the primary keys from the other two tables. What
I've been doing is creating a query for the sub report
(qryConferenceParticiants) and basing the subform on that.
The query pulls the confrenceID from the tblConference, the
PartcipantID from the tblParticipants and all the detail fields from
tblParticipatns I need (Name, employee ID, etc). I also pull the
Junction table primary key as well (autonumber).
This usually does not work. When I put the subform into the main form
and I click in it, I get the message:
"You tried to assign the Null value to a variable that is not a Variant
data type. (Error 3162)"
The bottom line is, I'm not sure which keys to pull and from where.
Should the conferenceID key come from the tblConfrence or the junction
table? The ParticipantID from the tbl Participants or the Junction
table? (by the way, the primary form is based on a query {just one
table} as well, not sure if that's an issue)
Thanks for (any) help on this. I'm lost.
Spimby