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
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