Access Access VBA question

NCB

Joined
Feb 9, 2013
Messages
1
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top