I am trying to run the following code and get Run Time Error 3075...Syntax Error (comma) in query expression '(FundShare, LawFirmShare, ClaimantShare)'
would really appreciate any advise on how to correct...Code is
Sub AddFieldsTemp()
Dim strTable As String
strTable = "tblTempTest"
'On Error GoTo ErrorHandler
'PUT THIS IN LATER
CurrentDb.Execute "ALTER TABLE tblTempTest " _
& "ADD COLUMN FundShare TEXT;"
CurrentDb.Execute "ALTER TABLE tblTempTest " _
& "ADD COLUMN LawFirmShare TEXT;"
CurrentDb.Execute "ALTER TABLE tblTempTest " _
& "ADD COLUMN ClaimantShare TEXT;"
CurrentDb.Execute "ALTER TABLE tblTempTest " _
& "ADD COLUMN AdverseCostPerc TEXT;"
CurrentDb.Execute "ALTER TABLE tblTempTest " _
& "ADD COLUMN FundCostofCapital TEXT;"
CurrentDb.Execute "ALTER TABLE tblTempTest " _
& "ADD COLUMN EstTimeComplete TEXT;"
'THIS CODE CREATES ERROR
CurrentDb.Execute " INSERT INTO [tblTempTest] " _
& " (FundShare, LawFirmShare, ClaimantShare) SELECT " _
& " (FundShare, LawFirmShare, ClaimantShare) " _
& " from ProfitShareNetDamagesT; "
'Exit Sub
'ErrorHandler:
'If Err.Number = 3380 Then
'Resume Next 'Tried to delete a non-existing table, resume
'End If
End Sub
would really appreciate any advise on how to correct...Code is
Sub AddFieldsTemp()
Dim strTable As String
strTable = "tblTempTest"
'On Error GoTo ErrorHandler
'PUT THIS IN LATER
CurrentDb.Execute "ALTER TABLE tblTempTest " _
& "ADD COLUMN FundShare TEXT;"
CurrentDb.Execute "ALTER TABLE tblTempTest " _
& "ADD COLUMN LawFirmShare TEXT;"
CurrentDb.Execute "ALTER TABLE tblTempTest " _
& "ADD COLUMN ClaimantShare TEXT;"
CurrentDb.Execute "ALTER TABLE tblTempTest " _
& "ADD COLUMN AdverseCostPerc TEXT;"
CurrentDb.Execute "ALTER TABLE tblTempTest " _
& "ADD COLUMN FundCostofCapital TEXT;"
CurrentDb.Execute "ALTER TABLE tblTempTest " _
& "ADD COLUMN EstTimeComplete TEXT;"
'THIS CODE CREATES ERROR
CurrentDb.Execute " INSERT INTO [tblTempTest] " _
& " (FundShare, LawFirmShare, ClaimantShare) SELECT " _
& " (FundShare, LawFirmShare, ClaimantShare) " _
& " from ProfitShareNetDamagesT; "
'Exit Sub
'ErrorHandler:
'If Err.Number = 3380 Then
'Resume Next 'Tried to delete a non-existing table, resume
'End If
End Sub