First, thanks to all of you guys and gals who give your time to provide assitance and solutions to us newbies. It is really appreciated.
I have a listbox that contains one or more file paths. I would like to save each of these paths to a field in a table record. I am also copying the file itself to a central location. I have gotten this far, but am having syntax probelms.
Code:
For i = 0 To Me.lstAttach.ListCount - 1
iAttachSQL = "INSERT INTO AttachmentFiles (File" & i & ")" _
& "VALUES ('" & Me.lstAttach(i) & endSQL
CurrentDb.Execute iAttachSQL
FileCopy(Me.lstAttach(i), "X:\Operations\Manufacturing\Root Cause Analysis\RCADatabase\" & Me.tbxPartNo.Value & "-" & (i)) Next i
It is throwing a sytax error on my FileCopy line. I am guessing that it has to do with the (i) variable, but not sure how to correct it. Any ideas?