Kod:
Option Compare Database
Option Explicit
Dim WithEvents txtBoxes As Access.Forms.Controls
Private Sub Form_Load()
Set txtBoxes = Me.Controls
End Sub
Private Sub txtBoxes_Enter(Index As Integer)
Dim currentTextBox As Control
Set currentTextBox = Me.Controls(txtBoxes(Index).Name)
If currentTextBox.BackColor = -2147483643 Then
currentTextBox.BackColor = 0
ElseIf currentTextBox.BackColor = 0 Then
currentTextBox.BackColor = -2147483643
End If
End Sub