I am getting a
run time error 3011: The microsoft database engine could not find the object '& TableToCopy &'. Make sure the object exists and that you spell its name and path name correctly
when I use the below command to copy a table with its structure and data in the same database. I am using variable for the tablenames instead of the actual table names because, I might have to come up with a table name based on a monthdate. That is why I have table names in parameter. Is there something wrong with the way I am passing the table names as parameters?
DoCmd.TransferDatabase acExport, "Microsoft Access", CurrentDb().Name, acTable, "& TableToCopy &", "& TableToCreate &", True
run time error 3011: The microsoft database engine could not find the object '& TableToCopy &'. Make sure the object exists and that you spell its name and path name correctly
when I use the below command to copy a table with its structure and data in the same database. I am using variable for the tablenames instead of the actual table names because, I might have to come up with a table name based on a monthdate. That is why I have table names in parameter. Is there something wrong with the way I am passing the table names as parameters?
DoCmd.TransferDatabase acExport, "Microsoft Access", CurrentDb().Name, acTable, "& TableToCopy &", "& TableToCreate &", True