Question : insert mutliple fields into a table

I have a form that contains a checkbox that when you click the box i want to be able to insert certain fields from the form into a table as a new row.

The field on the form as well as the table are :

ClaimID

The fields in the table I want to insert a new row are:

EORRecvd  (Yes/NO)
CLaimID  (equal to the Claimid on the form)

Here is the syntax I have figured out so far/

Private Sub EORReceived_Click()
Dim strSQL As String

strSQL = "INSERT INTO tblEORrecvd (EORRECEIVED  ClaimID)  Values ('1' & [claimid])"

CurrentDb.Execute strSQL
End Sub

This is not working can someone help please/

Answer : insert mutliple fields into a table

yes =-1 in access

if the field claimid is Text, use this
strSQL = "INSERT INTO tblEORrecvd (EORRECEIVED , ClaimID)  Values (-1,'" &  me.claimid & "')"


if the field claimid is Number, use this
strSQL = "INSERT INTO tblEORrecvd (EORRECEIVED , ClaimID)  Values (-1," & me.claimid & ")"

CurrentDb.Execute strSQL
End Sub
Random Solutions  
 
programming4us programming4us