Hi quite new to VB.2005 and I'm looking for some help please.

Let me tell what I want to achieve... probably is not the best approach how I'm trying to do but anyway... somebody might guide me.

I have an MDI form. From the menu I want to load a data bound form (MyDataForm) but before is shown I would like to restrict the records using another form (MyFilterForm) which would give the chance to the users to filter the data form.

So...
Code in the MenuItem:
Code:
 
Dim F as new MyDataForm
Dim s as new MyFilterForm
S.MdiParent=Me
S.OtherForm = F 'OtherForm is a Form varible on S

S.Show()
When loading S I need to loop trough all controls on OtherForm(F) to get:
1.Control name
2.Control type
3.Bound control IsValueType property

On my Filter form (S) the controls for selection will be created at runtime based on the above. I have to create controls with numbers, text, check boxes etc

I have managed to get 1 and 2 but I do not know how to refer programatically to get 3.
The ideea is to have form S as stand alone as possible. I could get all this information right at the beginning but I have manny forms using F and copy/paste the same code is not too "elegant".

I consider that ideally would be to be able to call like this:
Code:
 
Dim F as new MyDataForm
Dim s as new MyFilterForm
S.MdiParent=Me
S.OtherForm = F 'OtherForm is a Form varible on S
S.MyRelevantDataTable= "MyFormDataTable"
S.Show()
Then to get point 3, to loop in the 'MyFormDataTable' till I get the collumn and GetType its IsValueType... don't know how to do this.

Can somebody give a steer please? I'm stuck at this point and searching on different forums but no success.

Thanks!