valeryk2000
Registered User.
- Local time
- Today, 15:57
- Joined
- Apr 7, 2009
- Messages
- 157
1) We are using SQL Server (all tables and queries, e.g. stored procedures) are on the server side - NO LINKED TABLES! All tables and st. procedures run via ADO.
2) On the client side we have forms with unbound controls, populated by recordsets.
3) When the form closes it keeps the values in combo/list boxes as Row Source property.
4) I want to get rid of these sticky stuff and use the following procedure on form_close (or form_deactivate):
===============================
Public Sub ClearAllListComboBox(frm As Form)
Dim controlItem As Control
For Each controlItem In frm
If TypeOf controlItem Is ListBox Or TypeOf controlItem Is ComboBox Then
controlItem.RowSource = ""
End If
Next
End Sub
=======================================
However when I open the form again it retains old data. In design view Row Source still has old Value List.
Ane suggestions?
Thanks
2) On the client side we have forms with unbound controls, populated by recordsets.
3) When the form closes it keeps the values in combo/list boxes as Row Source property.
4) I want to get rid of these sticky stuff and use the following procedure on form_close (or form_deactivate):
===============================
Public Sub ClearAllListComboBox(frm As Form)
Dim controlItem As Control
For Each controlItem In frm
If TypeOf controlItem Is ListBox Or TypeOf controlItem Is ComboBox Then
controlItem.RowSource = ""
End If
Next
End Sub
=======================================
However when I open the form again it retains old data. In design view Row Source still has old Value List.
Ane suggestions?
Thanks