Kamis, 27 Agustus 2015

[MS_AccessPros] Syntax help

 

Friends,

Can't quite get the syntax right on this SQL statement trying to append a record from a form to a table.

Here is the VBA SQL:

strSQL = "INSERT INTO tblResults ( [Record No], [Form ID], [Pass/Fail], [Score], [Possible], [Date] )" & vbCrLf & _
             "Values ( " & lngRecNo & ", " & strTestNo & ", " & strPassFail & ", " & strScore & ", " & strPossible & ", #" & dteAward & "#);"


It returns:

INSERT INTO tblResults ( [Record No], [Form ID], [Pass/Fail], [Score], [Possible], [Date] )
Values ( 2, 01, Pass, 9, 9, #8/27/2015#);


But I'm getting error 3061. Too few parameters. Expected 1.

Record No is a long

Form ID is text

Pass/Fail is text

Score is text

Possible is text

Date is a date.


Doyce

__._,_.___

Posted by: winberry.doyce@roadsysinc.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

.

__,_._,___

Tidak ada komentar:

Posting Komentar