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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with "INSERT INTO" statement 1

Status
Not open for further replies.

dpav29

Technical User
Aug 3, 2001
155
US
Hi,

I am attempting to write fields from a form and sub/sub forms to antoher table. I can make it work with numeric values, but not with text. I've tried various combinations like 'text' and "'text'", but can't get it to work. The way it is below, i get an "enter parameter value" popup on that third (Notes) field. what am i doing wrong?

DoCmd.RunSQL ("INSERT INTO [Responses](DistributorID,SubQuestionID,ResponseNumber,Notes)
VALUES (" & Forms![frmActualSurvey].Form![DistributorID] & ",
" & Forms![frmActualSurvey]![frmMainSurveyQuestions]![sbfrmSubQuestions].Form![QuestionID] & ",
" & Forms![frmActualSurvey]![frmMainSurveyQuestions]![sbfrmSubQuestions].Form![Response] & ",
" & Forms![frmActualSurvey]![frmMainSurveyQuestions]![sbfrmSubQuestions].Form![Notes] & ");")
 
[tt]...
[!]'[/!]" & Forms![frmActualSurvey]![frmMainSurveyQuestions]![sbfrmSubQuestions].Form![Notes] & "[!]'[/!]);")[/tt]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top