My Assistant
![]() ![]() |
|
|
Nov 21 2005, 11:34 AM
Post
#1
|
|
|
UtterAccess Member Posts: 47 |
Good morning,
I am trying to create an append qry that will take a student from tblStudent, and add them with all courses in tblCourses to tblStudentCourses. I have tried everything I know possible but it is not working. Here is my set up: tblStudent *alias FName LName tblCourse *CourseID Course Disc tblStudentCourses SI (StudentID) CI (CourseID) I am trying to populate the tblStudentCourses with the student enrolled in all courses upon enrollment. |
|
|
|
Nov 21 2005, 11:37 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 5,231 From: Scotland (Sunny Glasgow) |
On what field does tblStudent relate to tblStudentCourses.
QUOTE I have tried everything I know possible but it is not working what, exactly is 'everything'? (Don't want to go giving you solutions that you've already tried (IMG:http://www.utteraccess.com/forum/style_emoticons/default/wink.gif) Jim |
|
|
|
Nov 21 2005, 11:43 AM
Post
#3
|
|
|
UtterAccess VIP / UA Clown Posts: 25,077 From: LI, NY |
I assume you have a form where you select the student and what to kick off the Append with an event (i.e. a command button).
You could use: Dim strSQL As String strSQL = "INSERT INTO tblStudentCourses (CourseID, StudentID) " strSQL = strSQL & "SELECT CourseID, " & Me.StudentID & " AS StudentID FROM tblCourse;" CurrentDB.Execute strSQL That should add all the courses with the currently selected student. |
|
|
|
Nov 21 2005, 12:06 PM
Post
#4
|
|
|
UtterAccess Member Posts: 47 |
The append qry I made only pulls the courses that the student is already enrolled in. I need the instructor to be able to put the student in all the courses and update start date and completed date as they go.
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 22nd May 2013 - 10:51 AM |