แปลงตัวพิมพ์จากใหญ่เป็นเล็กจากเล็กเป็นใหญ่
กระทู้เก่าบอร์ด อ.Yeadram

 1,205   1
URL.หัวข้อ / URL
แปลงตัวพิมพ์จากใหญ่เป็นเล็กจากเล็กเป็นใหญ่

Access 2007 เขียนโปรแกรม VBA
Left Function
Right Function
LCase Function และ
UCase Function
**แบ่ง ๆ กันดู คอมเม้นท์ด้วยนะ**
Part-1 ออกแบบฟอร์ม
Part-2 เขียน Code คำสั่ง
Part-3 ทดสอบการทำงาน

1 Reply in this Topic. Dispaly 1 pages and you are on page number 1

1 @R17542
รหัส VBA ครับ

Private Sub cmdClear_Click() 'ปุ่ม Clear หน้าจอ
On Error Resume Next
Me.txtOriginal.Value = ""
Me.txtLeft.Value = ""
Me.txtRight.Value = ""
Me.txtLCase.Value = ""
Me.txtUCase.Value = ""
Me.txtValue1.Value = ""
Me.txtValue2.Value = ""
End Sub

Private Sub cmdOK_Click() 'ปุ่ม OK
'Created by iBasskung
On Error GoTo ErrDesc
Dim funLeft, strLeft, funRight, strRight, funLCase, strLCase, funUCase, strUCase
Dim Value1 As Long
Dim Value2 As Long
Value1 = Me.txtValue1.Value
Value2 = Me.txtValue2.Value
funLeft = Me.txtOriginal.Value
strLeft = Left(funLeft, Value1)
funRight = Me.txtOriginal.Value
strRight = Right(funRight, Value2)
funLCase = Me.txtOriginal.Value
strLCase = LCase(funLCase)
funUCase = Me.txtOriginal.Value
strUCase = UCase(funUCase)

Me.txtLeft.Value = strLeft
Me.txtRight.Value = strRight
Me.txtLCase.Value = strLCase
Me.txtUCase.Value = strUCase
txtFocus.SetFocus
ErrExit:
Exit Sub
ErrDesc:
MsgBox "Error Number หมายเลข" & " " & Err.Number & " " & Err.Description, vbCritical, "Error ครับ"
Resume ErrExit
End Sub
@ ประกาศใช้งานเว็บบอร์ดใหม่ => บอร์ดเรียนรู้ Access สำหรับคนไทย
แล้วจะใส่ลิ้งอ้างอิงมาที่โพสต์เก่านี้หรือไม่ก็ตามสะดวกครับ
Time: 0.2921s