hi, i'm using the code below to insert data into an access db but keep gettin the error "Datatype mismatch in criteria expression"
total = Integer.Parse(txtMonth.Text) * Integer.Parse(rent.Text)
Com.CommandText = "Insert into Report Values (?,?,?,?,?,?,?,?,?, NOW())"
With Com.Parameters
.Add("@ID", OleDbType.Integer).Value = CID
.Add("@Tenant", OleDbType.VarChar).Value = cboTenant.Text
.Add("@type", OleDbType.VarChar).Value = housetype.Text
.Add("@loc", OleDbType.VarChar).Value = locate.Text
.Add("@rent", OleDbType.Currency).Value = rent.Text
.Add("@months", OleDbType.Integer).Value = txtMonth.Text
.Add("@total", OleDbType.Currency).Value = total
.Add("@mop", OleDbType.VarChar).Value = cbomop.Text
.Add("@stat", OleDbType.VarChar).Value = stat
End With
Com.ExecuteNonQuery()
Com.Parameters.Clear()
Review.Show()