DATA TYPE MISMATCH ERROR CRITERIA

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text <> " " And TextBox2.Text <> " " And TextBox3.Text <> " " And TextBox4.Text <> " " And TextBox5.Text <> " " And TextBox6.Text <> " " And TextBox7.Text <> " " And TextBox8.Text <> " " And TextBox9.Text <> " " And TextBox10.Text <> " " And ComboBox4.Text <> " " And ComboBox5.Text <> " " And RichTextBox1.Text <> " " Then
            Dim s As String
            Dim sex As String
            If RadioButton1.Checked = True Then
                sex = "Male"
            Else
                sex = "Female"
            End If
            form3.connect()

            s = "insert into appdetails values(" + TextBox1.Text + "," + TextBox2.Text + ",'" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + sex + "','" + ComboBox4.Text + "','" + TextBox6.Text + "'," + TextBox7.Text + ",'" + TextBox8.Text + "','" + ComboBox5.Text + "','" + RichTextBox1.Text + "'," + TextBox9.Text + "," + TextBox10.Text + ")"
            MsgBox(s)
            form3.update(s)
            MsgBox("Saved Successfully")
            clear()
        Else
            MsgBox("Pls fill all the details")
        End If
    End Sub

Not enough detail to help. Is this MSAccess VBA? If so, what version of MSAccess are you using? Are you just trying to execute the statement assembled in variable 's'? Are you trying to change the data source for form3? What is the structure of your table 'appdetails'? What are the datatypes of the columns? Is it bound to a control, or to the form? And so on and so on.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.