chris davies
Registered User.
- Local time
- Today, 16:48
- Joined
- Mar 20, 2005
- Messages
- 86
Hi Folks,
I am trying to create a subquery which populates an intermediary table using the primary keys from four other tables.
It looks horrendous I know, and it most probably is since it doesn't work. Could someone please spare the time to look at this and tell me why I get a "MISSING SEMI COLON " error
I am trying to create a subquery which populates an intermediary table using the primary keys from four other tables.
Code:
Insert into Person_Character_Film_Role (PersonID, CharacterID, FilmID, RoleID) VALUES ('" & PersonID & "', '" & CharacterID & "', '" & FilmID & "', '" & RoleID & "') WHERE Person.PersonID = (SELECT PersonID FROM Person WHERE Person = Me.txtPerson) AND Character.CharacterID = (SELECT CharacterID FROM Character WHERE Character = Me.txtCharacter) AND Film.FilmID = (SELECT FilmID FROM Film WHERE Film = Me.cmbFilm) AND Role.RoleID = (SELECT RoleID FROM Role WHERE Role = Me.cmbRole);
It looks horrendous I know, and it most probably is since it doesn't work. Could someone please spare the time to look at this and tell me why I get a "MISSING SEMI COLON " error