Web Page Design and Hosting

January 30, 2007

PopulateDataSet() populate the controls on the form with

Filed under: professional development with web apis — webmaster @ 11:22 pm

MsgBox( Record deleted locally, but you need to press Save to makechanges permanent in database. ) move to the first recordintCurRecord = 0PopulateControlsOnForm() End IfExit Subhandleerror: MsgBox( An error occurred in btnDelete_Click: & Err.Number & - & Err.Description) Exit SubEnd Sub21.Add the following btnSearch_Clickevent procedure to the form so the code will executewhen the Search button is clicked. This event will navigate through the local dataset looking contact record that matches the search criteria. If a match is found, that record becomes thecurrent record displayed on the form. Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As _ System.EventArgs) Handles btnSearch.ClickOn Error GoTo handleerrorDim intRow As Integer search through the dataset for a matching recordIf txtSearchLName.Text = And txtSearchCompany.Text <> Then if only company was specified as search criteria loop through dataset looking for matching companyFor intRow = 0 To contactDS.Tables( Contacts ).Rows.Count - 1If contactDS.Tables( Contacts ).Rows(intRow)( Company ) = _ txtSearchCompany.Text Then a match was found so go to the recordintCurRecord = intRowPopulateControlsOnForm() End IfNext intRowElseIf txtSearchLName.Text <> And txtSearchCompany.Text = Then if only last name was specified as search criteria loop through dataset looking for matching companyFor intRow = 0 To contactDS.Tables( Contacts ).Rows.Count - 1If contactDS.Tables( Contacts ).Rows(intRow)( LastName ) = _ txtSearchLName.Text Then a match was found so go to the recordintCurRecord = intRowPopulateControlsOnForm() End If247Case

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Mac Web Hosting services

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.

Powered by Java Web Hosting