C
Carl Rapson
I'm programmatically setting a combo box value using a DLookUp, and I would
like to simulate the combo box's AfterUpdate event. The problem is, I'm not
working with the control directly -- I'm iterating through the Controls
collection and setting each control, something like:
Dim ctl as Control
For Each ctl In Me.Controls
If (ctl.ControlType = acTextBox) Or (ctl.ControlType = acComboBox)
Then
ctl.Value = DLookup("[Default Name]", "[CSM Defaults]",
"[BA]='" & strBA & "' AND [Office]='" & strOffice & "'")
Eval ctl.Name & "_AfterUpdate()"
End If
End If
Next
The control value gets set OK, but I get an error 2425 on the Eval statement
(the database can't find the function name). I know the control events are
Subs, not Functions; is that the problem? Does Eval only work with
Functions? Is there another way to do what I want, using either Eval or
another method?
Thanks for any information,
Carl Rapson
like to simulate the combo box's AfterUpdate event. The problem is, I'm not
working with the control directly -- I'm iterating through the Controls
collection and setting each control, something like:
Dim ctl as Control
For Each ctl In Me.Controls
If (ctl.ControlType = acTextBox) Or (ctl.ControlType = acComboBox)
Then
ctl.Value = DLookup("[Default Name]", "[CSM Defaults]",
"[BA]='" & strBA & "' AND [Office]='" & strOffice & "'")
Eval ctl.Name & "_AfterUpdate()"
End If
End If
Next
The control value gets set OK, but I get an error 2425 on the Eval statement
(the database can't find the function name). I know the control events are
Subs, not Functions; is that the problem? Does Eval only work with
Functions? Is there another way to do what I want, using either Eval or
another method?
Thanks for any information,
Carl Rapson