Forms - How to open a form using a filter

Microsoft Visual studio 2008 professiona...
June 24, 2010 at 07:22:23
Specs: Windows XP
I am new to VB and Visual Studio 2008. I want to use a button on one form to open another form based on the criteria found in the first form. The first form will be the parent form, the second the child form. I know that on MS Access this can be set up by choosing a text box on one form to filter the info in another filed on the second form. I have been successful at opening one form from another form, but not filtering it when it opens. Here is what I am using to open another form:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim frmcliniclocation As New frmClinic
frmcliniclocation.Show()
End Sub

Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Visible = False
End Sub

Can you help me to know how to filter the info?

Thanks


See More: Forms - How to open a form using a filter

Report •

#1
June 25, 2010 at 15:04:57
Forms are just like any other .NET object. Give frmClinic a public property and use that to send your filter from your first form to your second.

Report •
Related Solutions


Ask Question