Quantcast
Viewing all articles
Browse latest Browse all 21195

[RESOLVED] values dosnt enter and saved in the database table

im trying to save some values in the database and it dosnt save
i get no error but it still dosnt save nothing
i dont know what is wrong
this is my code
Code:

Private Sub Command1_Click()
        Dim NewID As Long
        NewID = NextID("SmsID", "SmsLogs")
        Dim strSQL As String
strSQL = "INSERT INTO SmsLogs "
strSQL = strSQL & "(SmsID, SmsMsg, SmsDate, SmsHour, SmsSender, SmsTotal) "
strSQL = strSQL & "VALUES("
strSQL = strSQL & NewID & ","
strSQL = strSQL & "'" & RplS(Txtmsg.Text) & "',"
strSQL = strSQL & "'" & RplS(TxtDate.Text) & "',"
strSQL = strSQL & "'" & RplS(TxtHour.Text) & "',"
strSQL = strSQL & "'" & RplS(Txt(5).Text) & "',"
strSQL = strSQL & "'" & RplS(Txt(1).Text) & "'"
strSQL = strSQL & ")"
CN.Execute strSQL

 End If
        MsgBox "The Data has been saved successfully", vbInformation
End Sub


Viewing all articles
Browse latest Browse all 21195

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>