ARTICLE

Developing a Record Navigation Form with Unbound Controls in VB.NET

Posted by Abrar Hussain Articles | ADO.NET in VB.NET July 20, 2003
The objective of this article is to develop a record navigation form with unbound controls. The form enables you to navigate through the records one at a time. In this application we have used a combo box, two text boxes and various command buttons.
Download Files:
 
Reader Level:

Objective

Developing a record navigation form with unbound controls. The form enables you to navigate through the records one at a time. In this application we have used a combo box, two text boxes and various command buttons. 

The following is the run time view of the form shown initially. When the form is loaded the data adapter is filled with data from the database and the combo box is populated with account numbers in ascending order.



Figure 1: Initial view.

The command buttons at the bottom of the form enable you to navigate through all the records one at a time. You can instantly go the first record and the last record by using the first and last button respectively. At the button of the page the current record number with respect to all the records is also displayed. 

These buttons are not the only means for navigating trough the records. You can also navigate through the records using the combo box. The combo box enables you to select an account number and one its selected index is changed it will display all the details of that account number, basically the customer's name and his balance.



Figure 2: Runtime view showing the last record. 

Navigating through the records is not the only thing the system provides. The system also enables you

  1. Add a new record to the database.
  2. Edit an existing record in the database.
  3. Delete an existing record in the database. 

When a new record is added or when an existing record is edited, the UPDATE button is used to update the actual database. The CANCEL button can be used in order to discard the changes you were about to make. 

When a user clicks the ADD button to add a new record all other buttons but the "UPDATE" and the "CANCEL" button are disabled. This is because the other buttons have no significance with the system is in ADD mode. When the customer is done when filling the details of the new record he is supposed to click the "UPDATE" button to update the actual database or the "CANCEL" button to discard the current changes.

The following figure shows the runtime view in the form in "ADD" mode.



Figure 3: ADD mode, only "UPDATE" and "CANCEL" buttons are enabled.



Figure 4: ADD mode, done with entering the details of a record.



Figure 5: A new record successfully added.

The following figures show the runtime view of the form in the "EDIT" mode.



Figure 6: Runtime view of the form in "EDIT" mode.



Figure 7: An existing record successfully updated.



Figure 8: An existing record successfully deleted.

share this article :
post comment
 

Dear Abrar

i use Command Form1.Show() in my Project But doesn't happen anything

Please tell me how i can call this form for test

regards Majid

 

Posted by Majid Ebrahimian Nov 30, 2010

Dear Abrar

i use Command Form1.Show() in my Project But doesn't happen anything

Please tell me how i can call this form for test

regards Majid

 

Posted by Majid Ebrahimian Nov 30, 2010

Is this applicable to an aspx page which does not use templated controls like formview, listview etc...

Posted by Ibili Kaya May 02, 2010

Umm, i dont see where you actually show us how to acheive this

Posted by shahed hussain Jul 25, 2009

Can I ask the code :

Shared<STAThread()> _

 

Means

Posted by ian diamse Feb 10, 2009
Nevron Diagram
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Team Foundation Server Hosting
Become a Sponsor