กระทู้เก่าบอร์ด อ.Yeadram
        
           1,013   2		  
          
					  
		    URL.หัวข้อ / 
		    URL
        
        ใส่เลขบัตรประชาชนให้เป็น ดอกจัน(*)      
    
      คืออยากให้เวลากรอก input mask ผมกำหนดให้เป็นแบบ id number
_-_____-____-_ ประมาณนี้ แต่อยากให้เวลากรอกตัวเลข
ขึ้นเป็น * ไปด้วยต้องทำอย่างไรครับ
อยากให้มี id number เหมือนเดิมแล้วก็ พิมเป็น password (*) ด้วยครับ
    
  _-_____-____-_ ประมาณนี้ แต่อยากให้เวลากรอกตัวเลข
ขึ้นเป็น * ไปด้วยต้องทำอย่างไรครับ
อยากให้มี id number เหมือนเดิมแล้วก็ พิมเป็น password (*) ด้วยครับ
				2 Reply in this Topic. Dispaly 1  pages and you are on page number 1 
				
        
    2 @R23801    
        
    
      ขอบคุณมากครับผม    
    
  
      Time: 0.4991s
    
      
		
2. ให้สร้าง Event procedure ดังนี้
[FONT=Courier]
Option Compare Database
Dim stText As String
Private Sub IDTemp_AfterUpdate()
Me.UserID = stText
End Sub
Private Sub IDTemp_GotFocus()
stText = ""
Me.IDTemp = ""
End Sub
Private Sub IDTemp_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKey0 To vbKey9
stText = stText & Chr(KeyCode)
KeyCode = vbKeyMultiply
Case vbKeyNumpad0 To vbKeyNumpad9
stText = stText & Chr(KeyCode - 48)
KeyCode = vbKeyMultiply
Case vbKeyEscape, vbKeyReturn
'Nothing change for these keys
Case Else
KeyCode = 0
End Select
End Sub
[/FONT]
ปล. อันนี้ใช้สำหรับ Form แบบ Single Form View ครับ