19
ห้อง MS Access / รบกวนขอโค้ด เอา ID ในเรคคอดล่าสุดมา + 1 เพื่อให้เรคคอดต่อไปหน่อยครับ
« เมื่อ: 06 ต.ค. 64 , 16:22:33 »
เหมือนกัน Autonumber ครับ แต่ผมจะเอาใส่ใน VBA ตัวเองผมก็คิดไม่ได้ด้วย
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
ไม่มีครับ ผมเช็คแล้ว เมื่อกี้ก็เช็คแล้วครับ
On Error GoTo Err_cmdDelete_Click
DoCmd.SetWarnings False
If MsgBox("ยืนยันลบข้อมูล?", vbQuestion + vbYesNo + vbDefaultButton2, "ลบข้อมูล?") = vbYes Then
DoCmd.RunCommand acCmdDeleteRecord
End If
Exit_cmdDelete_Click:
DoCmd.SetWarnings True
Exit Sub
Err_cmdDelete_Click:
MsgBox Err.Description
Resume Exit_cmdDelete_Click
ลองดูก่อนนะครับ