Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Binding data aware controls

Status
Not open for further replies.

Thead7

Programmer
Feb 2, 2002
7
GB
Is there a way to bind all my controls in a program once, at the moment I am having to rebind them every time I move or alter records which is getting slower as I add more controls to the form.
My current code is something like :

For Each fctrl In frmInstMain.Controls
If (TypeOf fctrl Is TextBox) Or (TypeOf fctrl Is Datacombo) Then
Set fctrl.DataSource = Nothing
Set fctrl.DataSource = DataEnvironment
End If
Next

The recordset and datafield of each control are set at design time.
Again any input would be much appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top