1
ห้อง MS Access / : ขอวิธี Save file excel แล้ว ข้อมูล เด้งเข้าไปใน Table ใน Access แบบ Auto
« เมื่อ: 16 ก.ค. 63 , 17:41:42 »
นำเข้าข้อมูลจาก Excel ลองสร้างปุ่มที่ฟอร์มแล้วรันดูครับ
Private Sub ImportExcel_Click()
DoCmd.SetWarnings False
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12Xml, "ชื่อตาราง", selectFile, True
MsgBox "นำเข้าข้อมูลเรียบร้อยแล้ว", vbInformation, "แจ้งให้ทราบ"
DoCmd.SetWarnings True
End Sub
Private Sub ImportExcel_Click()
DoCmd.SetWarnings False
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12Xml, "ชื่อตาราง", selectFile, True
MsgBox "นำเข้าข้อมูลเรียบร้อยแล้ว", vbInformation, "แจ้งให้ทราบ"
DoCmd.SetWarnings True
End Sub
โพสต์นี้ได้รับคำขอบคุณจาก: Dilok Saributr