T
Tim Johnson
I have created a form with a number of unbound text boxes. The text boxes
control source update frequently based on user actions.
The form works great in both Access 2007 and 2003. However; when a user
tries the same actions in Access XP (2002), they receive error number 3125
and the error description lists the form's RecordSource (it's the semicolon
throwing error 3125, I assume, however, why it's looking at that property in
the first place is where I'm confused).
Below is a sample of the code I'm using to clear everything. This is the
code that is throwing the error:
Sub RefreshScreen()
Dim ctl As Control
For Each ctl In Me.Controls
If Left(ctl.Name,3) = "dyn" Then
If Right(ctl.Name,1) = "t" Then
Me.Controls(ctl.Name).ControlSource = "="""""
Me.Controls(ctl.Name).BackColor = 16777215
Me.Controls(ctl.Name).ForeColor = 0
ElseIf Right(ctl.Name, 1) = "w" Then
Me.Controls(ctl.Name).ControlSource = "=0"
End If
End If
Next ctl
Does anyone have any idea why this would throw a Field Name error in Access
XP, but work perfectly fine in 2003 AND 2007?
control source update frequently based on user actions.
The form works great in both Access 2007 and 2003. However; when a user
tries the same actions in Access XP (2002), they receive error number 3125
and the error description lists the form's RecordSource (it's the semicolon
throwing error 3125, I assume, however, why it's looking at that property in
the first place is where I'm confused).
Below is a sample of the code I'm using to clear everything. This is the
code that is throwing the error:
Sub RefreshScreen()
Dim ctl As Control
For Each ctl In Me.Controls
If Left(ctl.Name,3) = "dyn" Then
If Right(ctl.Name,1) = "t" Then
Me.Controls(ctl.Name).ControlSource = "="""""
Me.Controls(ctl.Name).BackColor = 16777215
Me.Controls(ctl.Name).ForeColor = 0
ElseIf Right(ctl.Name, 1) = "w" Then
Me.Controls(ctl.Name).ControlSource = "=0"
End If
End If
Next ctl
Does anyone have any idea why this would throw a Field Name error in Access
XP, but work perfectly fine in 2003 AND 2007?