Recent content by pkan71

  1. P

    Insert values into Table using a form

    Hi Paul, The ProctorID is a Number data type. Thanks. Patrick
  2. P

    Insert values into Table using a form

    Hi Paul, I changed it to a String But I still get a Compile Error: Syntax Error. See Below. Thanks for your help. Private Sub Test_Click() Dim strSQL As Integer strSQL = "Insert Into tblScanned(ProctorID) Values ('"&Me!Test&"');" Debug.Print strSQL CurrentDb.Execute strSQL Me!Test = "...
  3. P

    Insert values into Table using a form

    I have a table named tblScanned with one field ProctorID. I have a form named Form1 with a unbound box called Test. The ProctorID field is a number. Below is the code. I compiled the code and I get a syntax error message. After I scan in the number, I want to clear out the unbound box...
  4. P

    Adding records to a table using a form

    Hi Sean, this is the current code. Private Sub Test_Click() Dim strSQL As String strSQL = "Insert Into tblScanned(ApplicantID) Values(" & Me!Test & ")" CurrentDb.Execute strSQL, dbFailOnError Me!Test = vbNullString End Sub I runs once fine and it gives me a Run-time error '3134': Syntax...
  5. P

    Adding records to a table using a form

    Hi Sean, Here is what I have. Private Sub Test_Click() Dim strSQL As Integer strSQL = "Insert Into tblScanned(ApplicantID) Values(& Me!Test & )" CurrentDb.Execute strSQL, dbFailOnError Me!Test = vbNullString End Sub When I remove the quotes, the line strSQL = "Insert Into...
  6. P

    Adding records to a table using a form

    Hi Sean, Thanks for the information. The ApplicantID is a number. The process works once and then I get the error message "Type mismatch" Any suggestions? Thanks. Patrick
  7. P

    Adding records to a table using a form

    I have a form (Form1) and a table (tblScanned). The form has a unbound box called Test. The table has a field called ApplicantID. I want to scan in Applicant numbers using the form and populate the table. My vba code is Private Sub Test_Click() DoCmd.RunSQL "INSERT INTO...
Back
Top Bottom