我有一个临时表,用于保存数据片段,最终创建完整记录。我正在尝试设置它,因此当您单击一个按钮时,它会从临时表中获取数据,将其放入主表中,然后删除临时表中的旧记录。
我试图使用这段代码,但似乎 VBA 编辑器中没有足够的空间来容纳它(因为我所有的列名似乎都太长而且太多了)
strSQL = "Insert Into ProjectsT (CustomerName, ProjectName, ProjectDesc, DateOfPurchase, ProjectDueDate, EngineerDueDate, CutplanDueDate, HardwareDueDate, ProjectComplete, EngineerComplete, CutplanComplete, HardwareComplete, WorkOrder, MaterialSpecs, CutplanPattern, Milestones, HardwareSpecs, SupplierName, ProjFilePath, DrawFilePath, DetailFilePath, CostFilePath, ProjectStartDate, EngineerStartDate, CutplanStartDate, HardwareStartDate, PackageReleasedToShop, EstAssemblyHours, CuttingDueDAte, TrakwareNumber) Select CustomerName, ProjectName, ProjectDesc, DateOfPurchase, ProjectDueDate, EngineerDueDate, CutplanDueDate, HardwareDueDate, ProjectComplete, EngineerComplete, CutplanComplete, HardwareComplete, WorkOrder, MaterialSpecs, CutplanPattern, Milestones, HardwareSpecs, SupplierName, ProjFilePath, DrawFilePath, DetailFilePath, CostFilePath, ProjectStartDate, EngineerStartDate, CutplanStartDate, HardwareStartDate, PackageReleasedToShop, EstAssemblyHours, CuttingDueDAte, TrakwareNumber From ProjectsTempT Where ID=" & Me.txtID & ";"
如果所有列的名称都相同,并且有这么多/长的名称,我将如何设置它以便它可以将临时表中的数据复制到主表中?