Code:
Private Sub SaveData()
'conn = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;password ='999999';Data Source=(local);Initial Catalog =TGB"
Conn2.Open
cmd = "INSERT INTO DMF_ERP_TumTag(FactoryID, TTLineNo, DateTime, " _
& "BlockNo, GloveType, TTSize, Side, Color, Texture, Length, Thickness, " _
& "GloveWeight, BasWeight, BasBarCode, CompTankNo, BasketNo, TumblerNo, " _
& "TumblerBoyID, Supervisor)" _
& " VALUES ('" & cboFacId.Text & ", " & ComboBox1.Text & "," _
& " #" & txtDateTime.Text & "#, " & Text2.Text & ", " & cboGloveType & ", " & cboSize.Text & "," _
& " " & cboSide.Text & ", " & cboColour.Text & ", " & cboTexture.Text & ", " & cboLength & "," _
& " " & cboThickness.Text & ", " & Text3.Text & ", " & Text1.Text & ", " & txtBarcode.Text & "," _
& " " & Text4.Text & ", " & Text5.Text & ", " & Text6.Text & " , " & Text7.Text & ", " & Text8.Text & " ')"
rs.Open cmd, adOpenStatic, adLockReadOnly
Conn2.Execute cmd