PDA

Click to See Complete Forum and Search --> : Importing/Updating table from Excel


pookie62
Jan 16th, 2005, 01:29 PM
Hi All,
First post here..(newbie)
I have an import from Excel into a user_table, problem is that (just found out..) when user x has a related filed in comp_table the updated record is not imported.
This is the code I use now:
DoCmd.CopyObject , "Deelnemer_copy", acTable, "Deelnemer"
DoCmd.SetWarnings False
DoCmd.RunSQL "Delete * from deelnemer"
DoCmd.SetWarnings True

ImportFile = Application.CurrentProject.Path & "\Deelnemer.xls"
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel3, "Deelnemer", ImportFile, True
How can I remove the RI, so this record can be updated ?
Then restore the RI ???
Have been reading a lot but can't find the solution..
Please help..