Link to home
Start Free TrialLog in
Avatar of glenn_grubb
glenn_grubbFlag for United States of America

asked on

Iterate databindings for bound controls on a form in VB 2008

I need to iterate through the bound controls on a form and pull out what field each bound control is connected to in an Access mdb. I am using Visual Studio 2008 VB. Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of melmers
melmers
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of glenn_grubb

ASKER

At first it didn't seem to work, but then I remember that you have to specifically call controls on a tabform (my controls are on pages in a tab form). The guts of the code I needed was this:
myPropertyBindField = myControl.DataBindings.Item(i).BindingMemberInfo.BindingField 'Bound Field
It returned the field bound to the control. Thanks