Hello All,
I'm trying to fix a piece of code that up till now worked just fine.
I have a public function that is suposed to copy a table in an access 2003 database and replace it. the problem is when it gets to the copy line I get a message that the table already exists and do I want to replace the existing table. the answer is Yes I always want to replace the existing table. Is there a way to program the "yes replace replace the existing table" so I don't have to answer the message each time?
Dim db As DAO.Database
Set db = CurrentDb
Dim xFname As Variant
xFname = Screen.ActiveForm.Name
DoCmd.Hourglass yes
DoCmd.CopyObject , "CRaw1", acTable, "CRawStructure"
DoCmd.CopyObject , "CRaw2", acTable, "CRawStructure"
DoCmd.CopyObject , "CRaw3", acTable, "CRawStructure
I'm trying to fix a piece of code that up till now worked just fine.
I have a public function that is suposed to copy a table in an access 2003 database and replace it. the problem is when it gets to the copy line I get a message that the table already exists and do I want to replace the existing table. the answer is Yes I always want to replace the existing table. Is there a way to program the "yes replace replace the existing table" so I don't have to answer the message each time?
Dim db As DAO.Database
Set db = CurrentDb
Dim xFname As Variant
xFname = Screen.ActiveForm.Name
DoCmd.Hourglass yes
DoCmd.CopyObject , "CRaw1", acTable, "CRawStructure"
DoCmd.CopyObject , "CRaw2", acTable, "CRawStructure"
DoCmd.CopyObject , "CRaw3", acTable, "CRawStructure