Hi all,
I am using the below code to link an excel spreadsheet to a record in a table and it is working great. My question is that on some occaisions, this object may need to be linked to more than one record. I am not sure if the code below can be used to link the records to the object using a looping structure or if it can be done in an SQL statement. I am able to create a basic loop structure but am not sure how to tackle this one. Can someone provide me with a few pointers?
Code:
DoCmd.OpenForm “frmSelectFileXP”, acNormal, , , , acDialog
oleTechnicalReport.Class = “Excel.Sheet” ‘ Set class name.
‘ Specify type of object.
oleTechnicalReport.OLETypeAllowed = acOLELinked
‘ Specify source file.
oleTechnicalReport.SourceDoc = Me.vTARReportName
‘ Create linked object.
oleTechnicalReport.Action = acOLECreateLink
oleTechnicalReport.SizeMode = acOLESizeZoom
Thanks
Kevin