ตัวอย่าง Me.Recalc หรือ Me.???.Requery ผมจะสั่งให้มันทำงานเมื่อทำอะไรสักอย่างก่อน(ผมใช้ Me. นำหน้า)
Private Sub Cus_ID_Click()
Cus_Tax_ID.Value = Cus_ID.Column(9)
Cus_Name.Value = Cus_ID.Column(1)
Cus_addess.Value = Cus_ID.Column(2) & " " & Cus_ID.Column(3) & Cus_ID.Column(4) & " " & Cus_ID.Column(5) & " " & Cus_ID.Column(6) & Cus_ID.Column(7) & " " & Cus_ID.Column(8) '& "."
Cus_Note2.Value = Cus_ID.Column(10)
Percent.Value = Cus_ID.Column(11)
Me.F_Bill_v7_Item.Form.T902 = Me.Percent
Me.Recalc
End Sub
Private Sub Cus_ID_AfterUpdate()
Me.Cus_ID = Format(Me.Cus_ID.Value, "00000")
Me.Recalc
End Sub
Private Sub Cus_ID_Enter()
Me.Cus_ID = Format(Me.Cus_ID.Value, "00000")
Me.Recalc
End Sub
Private Sub Ang1_GotFocus()
Me.Ang1.Requery
End Sub
Private Sub Ang2_GotFocus()
Me.Ang2.Requery
End Sub
Private Sub Ang3_GotFocus()
Me.Ang3.Requery
End Sub
Private Sub Ang4_GotFocus()
Me.Ang4.Requery
End Sub
Private Sub Ang5_GotFocus()
Me.Ang5.Requery
End Sub
Private Sub Ang6_GotFocus()
Me.Ang6.Requery
End Sub