Oleg_123 at xuppa.com
Oleg_123 at xuppa.com
Mon Jun 28 18:06:58 CDT 2004
i can't remember what am i doing wrong; when i try strSQL = "Insert into Testing(EntID,AttribID, AttribName, DataTypeCode,Comment) Values( 'txtEntID.Text','txtAttribID.Text',' txtAttribName.Text',' txtDataTypeCode.text',' txtComment.Text')" it works, and this way doesn't.. Private Sub cmdImport_Click() Dim strSQL As String strSQL = "Insert into Testing(EntID,AttribID, AttribName, DataTypeCode,Comment) Values( txtEntID.Text,txtAttribID.Text, txtAttribName.Text,txtDataTypeCode.text,txtComment.Text)" CurrentDb.Execute strSQL End Sub tried substituting with variables, first 3 are number fields, others text Private Sub cmdImport_Click() Dim a, b, c, d, e, f a = txtAppsId b = txtEntID c = txtAttribID d = txtAttribName e = txtDataTypeCode f = txtComment Dim strSQL As String strSQL = "Insert into Testing(AppsID, EntID,AttribID, AttribName, DataTypeCode,Comment) Values( a,b,c, & """ & d & """ & , & """ & e & """ &, & """ & f & """ &)" CurrentDb.Execute strSQL End Sub ----------------------------------------- Make Money and Find Love at Finally.com http://www.finally.com/?link=webmail