Hi,
I have this code in Access VBA and it is not working, I hope somebody can give me some help on this:
Private Sub btnAddWorkingday_Click()
Dim strSQL As String
Dim strDate As Integer
Dim lastID As Integer
strSQL = "INSERT INTO tblSchoolWorkingDays (CALENDAR_DATE) VALUES ('" & tBoxDateToAdd.Value & "'); SELECT @@IDENTITY AS LastID;"
DoCmd.RunSQL strSQL
End Sub
Thanks in advance.
I have this code in Access VBA and it is not working, I hope somebody can give me some help on this:
Private Sub btnAddWorkingday_Click()
Dim strSQL As String
Dim strDate As Integer
Dim lastID As Integer
strSQL = "INSERT INTO tblSchoolWorkingDays (CALENDAR_DATE) VALUES ('" & tBoxDateToAdd.Value & "'); SELECT @@IDENTITY AS LastID;"
DoCmd.RunSQL strSQL
End Sub
Thanks in advance.