Loop เข้า Sub form โดยสั่งจาก Main form


0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

28 ต.ค. 64 , 09:44:27
อ่าน 563 ครั้ง

001Jetnipit

Loop เข้า Sub form โดยสั่งจาก Main form
« เมื่อ: 28 ต.ค. 64 , 09:44:27 »
โค๊ด: [Select]
For Each ctl In Detail.Controls
        If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox Then
            If ctl.Name Like "Text*" Then
                If ctl.Locked = True Then
                        ctl.Locked = False
                        ctl.ForeColor = vbRed
                        Me.Form1.Form.LabelEdit.Visible = True
                Else
                        Me.Form1.Form.LabelEdit.Visible = False
                        ctl.Locked = True
                        ctl.ForeColor = vbBlack
               End If
           End If
        End If
Next

อันนี้เป็นโค้ด loop ของผมครับ แต่ไม่ทราบว่าต้องสั่งยังไงให้มันไป loop ใน Sub form หรอครับ ประมาณนี้ครับ



 


บอร์ดเรียนรู้ Access สำหรับคนไทย



There are no comments for this topic. Do you want to be the first?
 

Sitemap 1 2 3 4 5