J
JC
Hello,
I am having trouble with the following SQL in VB in access. I want to
append the following data to an existing table in my database. The
following SQL gives me an error when trying to run. I want to use an
open unbound, form, text box to feed the criteria to the SQL statement.
Please help if you can. Below is the DoSql string:
The Where clause is giving me the problem...
DoCmd.RunSQL "INSERT INTO tblHurnsHistory ( SyStudentID, StudentName,
SSN, adTrmCode, GPA_creditsEarned, StatusDesc, StatusDate, LDA,
ProgVersCode, TermCode, term_credits, Grads_creditsEarned, TotalCrd,
creditsAttempt, GPA, CreditsRemaining, SumOfReceived, SumOfRefunded,
FundSource, Comment )" & _
"SELECT tblTotalCvueData.SyStudentID, tblTotalCvueData.StudentName,
tblTotalCvueData.SSN, tblTotalCvueData.adTrmCode,
tblTotalCvueData.GPA_creditsEarned, tblTotalCvueData.StatusDesc,
tblTotalCvueData.StatusDate, tblTotalCvueData.LDA,
tblTotalCvueData.ProgVersCode, tblTotalCvueData.TermCode,
tblTotalCvueData.term_credits, tblTotalCvueData.Grads_creditsEarned,
tblTotalCvueData.TotalCrd, tblTotalCvueData.creditsAttempt,
tblTotalCvueData.GPA, tblTotalCvueData.CreditsRemaining,
tblTotalLedger.SumOfReceived, tblTotalLedger.SumOfRefunded,
tblTotalLedger.FundSource, tblTotalCvueData.Comment" & _
"FROM tblTotalCvueData LEFT JOIN tblTotalLedger ON
tblTotalCvueData.SyStudentID = tblTotalLedger.SyStudentID" & _
"WHERE (tblTotalCvueData.adTrmCode=([Forms]![frmProcess]![txtTerm]))"
DoCmd.SetWarnings True
Thanks in advance,
Justin
I am having trouble with the following SQL in VB in access. I want to
append the following data to an existing table in my database. The
following SQL gives me an error when trying to run. I want to use an
open unbound, form, text box to feed the criteria to the SQL statement.
Please help if you can. Below is the DoSql string:
The Where clause is giving me the problem...
DoCmd.RunSQL "INSERT INTO tblHurnsHistory ( SyStudentID, StudentName,
SSN, adTrmCode, GPA_creditsEarned, StatusDesc, StatusDate, LDA,
ProgVersCode, TermCode, term_credits, Grads_creditsEarned, TotalCrd,
creditsAttempt, GPA, CreditsRemaining, SumOfReceived, SumOfRefunded,
FundSource, Comment )" & _
"SELECT tblTotalCvueData.SyStudentID, tblTotalCvueData.StudentName,
tblTotalCvueData.SSN, tblTotalCvueData.adTrmCode,
tblTotalCvueData.GPA_creditsEarned, tblTotalCvueData.StatusDesc,
tblTotalCvueData.StatusDate, tblTotalCvueData.LDA,
tblTotalCvueData.ProgVersCode, tblTotalCvueData.TermCode,
tblTotalCvueData.term_credits, tblTotalCvueData.Grads_creditsEarned,
tblTotalCvueData.TotalCrd, tblTotalCvueData.creditsAttempt,
tblTotalCvueData.GPA, tblTotalCvueData.CreditsRemaining,
tblTotalLedger.SumOfReceived, tblTotalLedger.SumOfRefunded,
tblTotalLedger.FundSource, tblTotalCvueData.Comment" & _
"FROM tblTotalCvueData LEFT JOIN tblTotalLedger ON
tblTotalCvueData.SyStudentID = tblTotalLedger.SyStudentID" & _
"WHERE (tblTotalCvueData.adTrmCode=([Forms]![frmProcess]![txtTerm]))"
DoCmd.SetWarnings True
Thanks in advance,
Justin