Ok so I've strained my eyes and looked elsewhere before bothering people on the forums but I cant get this to work in Access 07 VB:
Private Sub Command3_Click()
If [Forms]![NORAM Subform]![previousDate] = "" Then
MsgBox "No previous date entered.", vbExclamation
Exit Sub
Else
Dim newDate As String
newDate = [Forms]![NORAM Subform]![previousDate]
Dim strSQL As String
strSQL = " SELECT * INTO " & newDate & " FROM [Global Data] "
DoCmd.RunSQL strSQL
strSQL = "DELETE * FROM [Global Data]"
DoCmd.RunSQL strSQL
End If
End Sub
I get the 3067 error on the red runSQL shown above.
Any suggestions would be much appreciated.
Thanks!
Private Sub Command3_Click()
If [Forms]![NORAM Subform]![previousDate] = "" Then
MsgBox "No previous date entered.", vbExclamation
Exit Sub
Else
Dim newDate As String
newDate = [Forms]![NORAM Subform]![previousDate]
Dim strSQL As String
strSQL = " SELECT * INTO " & newDate & " FROM [Global Data] "
DoCmd.RunSQL strSQL
strSQL = "DELETE * FROM [Global Data]"
DoCmd.RunSQL strSQL
End If
End Sub
I get the 3067 error on the red runSQL shown above.
Any suggestions would be much appreciated.
Thanks!
Last edited: