Controls Binding Inquiry?

  • Thread starter Thread starter al
  • Start date Start date
A

al

Hi,

If controls (textboxs,combos,etc...) are dataset-bound and dataset is
used interchangeably (rowfilter on and off), do I have to clear
bindings when user get different no. of records, or binding context
will adjust itself to this?? That is, do I have to call this sub each
time row filter is changed (on and off)


Sub clearbinding()
Dim ctl As Control
Dim txt As Control


ds.Tables("employees").clear
For Each ctl In frmemp.Controls
If TypeOf ctl Is GroupBox Then
For Each txt In ctl.Controls
If TypeOf txt Is TextBox Then
txt.Text = ""
txt.DataBindings.Clear()
End If
Next
End If
Next
ds_changexposition()
End Sub
MTIA,
Grawsha
 
Hi al,

al said:
Hi,

If controls (textboxs,combos,etc...) are dataset-bound and dataset is
used interchangeably (rowfilter on and off), do I have to clear
bindings when user get different no. of records, or binding context
will adjust itself to this?? That is, do I have to call this sub each
time row filter is changed (on and off)

I don't think it is necessary at all.
 
Back
Top