19
ห้อง MS Access / : Code ใช้งานไม่ได้
« เมื่อ: 21 มี.ค. 64 , 13:57:53 »
ไฟล์ใหญ่ไหมครับส่งมาผมลองเปิดดู error หน่อย
โพสต์นี้ได้รับคำขอบคุณจาก: kitisak
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.
Private Sub Command6_Click()
Dim extensionName As String
extensionName = Dir(Me.txtPath & (Me.txtFileName & "*"))
extensionName = Right$(extensionName, Len(extensionName) - InStrRev(extensionName, "."))
Me.txtExtensionName = extensionName
End Sub
ใน textbox มีแต่ชื่อไฟล์ ไม่มีนามสกุลไฟล์ เราจะตรวจสอบได้อย่างไรครับ
เราจะเก็บค่า text box ไว้ในตัวแปรก่อนมีการเปลี่ยนแปลงได้อย่างไร
ลองในเหตุการณ์ before update แล้วไม่ได้ครับ
เราจะตรวจสอบนามสกุลไฟล์
จากชื่อไฟล์ที่กำหนดใน text box ได้อย่างไรครับ
SELECT tblTruck.TruckNO, tblTruck.TruckBrand, tblTruck.DriverName
FROM tblTruck
WHERE ((Not (tblTruck.TruckNO) Is Null));
1.1 กำหนด BoundColumn(หรือ คอลั่มที่ผู้ไว้ เท่ากับ 1)SELECT [tblTruck].TruckBrand FROM tblTruck GROUP BY [tblTruck].TruckBrand HAVING ((Not ([tblTruck].TruckBrand) Is Null));
2.1 กำหนด BoundColumn(หรือ คอลั่มที่ผู้ไว้ เท่ากับ 1)SELECT [tblTruck].DriverName FROM tblTruck GROUP BY [tblTruck].DriverName HAVING ((Not ([tblTruck].DriverName) Is Null));
3.1 กำหนด BoundColumn(หรือ คอลั่มที่ผู้ไว้ เท่ากับ 1)Private Sub TruckNO_AfterUpdate()
If Not IsNull(Me.TruckNO) Then
Me.TruckBrand = Me.TruckNO.Column(1)
Me.DriverName = Me.TruckNO.Column(2)
Else
Me.TruckBrand = Null
Me.DriverName = Null
End If
End Sub
ขอสอบถามการแสดงรหัสไปรษณีย์ จากการใช้เครื่องอ่านบัตรประชาชนค่ะ ปรกติบัตรประชาชนไม่มีข้อมูลรหัสไปรษณีย์ใช่ไหมคะ เวลาอ่านบัตรไม่พบข้อมูลรหัสไปรษณีย์ ถ้าเราต้องการให้เสียบบัตรประชาชนแล้วให้ขึ้นรหัสไปรษณีย์อัตโนมัติจากบัตร สามารถทำได้ด้วยวิธีไหนได้บ้างคะ รบกวนแนะนำด้วยค่ะ ขอบคุณค่ะ
ถ้าต้องการให้กรอกเฉพาะภาษาไทย หรือ กรอกเฉพาะภาษาอังกฤษ ครับ