Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RUNSQL problem in ADP Form

Status
Not open for further replies.

Farzam

MIS
Nov 5, 2006
19
LU
Dear all,
I have a project back end SQL SERVER front end ADP access
I want to run this SQL statement but iam faild to.
i dont know what is the problem

--------------------------------------------------
Dim SQL As String

SQL = "INSERT INTO Forecast_NEW_TEMP_Table" & _
"(CRIS_NO,Quarters,Years,Amount,YearAFG,Start_Qrt,qtr,qtrn,qrtstart)" & _
"SELECT CRIS_NO,Quarters,Years,Amount,YearAFG,Start_Qrt,qtr,qtrn,qrtstart FROM ForeCAST_NEW_Pipeline" & _
"WHERE CRIS_No = " & Me.CRIS_No

DoCmd.RunSQL SQL
--------------------------------------------------
Note Iam running this on an After Update of a text box in current form and the where condition checks the number in current form
please check and correct it

regards,
 
You are missing spaces in the SQL. It would be best to Debug.Print to the immediate window and check the syntax. The dedicated forum you want is forum958.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top