Visual Basic Help - Phone-Book
Microsoft Visual Basic 6.0 help and Tutorials
MS-Visual Basic 6.0 & MS-Access 2003 - Crystal Reports to create a desktop software professionally
(4) How does it work ?
    • A phone-Book is used to store Data about friends phone numbers and in our application, it stores photos too using the MS-Access 2003 database.
    • The application starts with the (MainFrm) which is used to input the friends' Data in the miscrosft database (MyBook.mdb) table using Visual Basic 6.0 interface form to accomplish this task. We will need to display the stored Data all together, so we will have to create another form called [Display.frm].
    • Using the [Display.frm] form will enable us to retrieve the stored Data from the Database table [Phones] onto the form [Friend Name, Friend Mobile, Friend Home-Phone, Friend Photo].

    Designing the Display from [Display.frm]

  • Create new form, name (Display.frm), save it as (Display.frm), save your application. The design and the controls on the form will look like this :

Creating new vb6 form

  • Linking this form to the (MainFrm.frm) is so easy :
    Just goto the (MainFrm) form and from the (CmdShow) button called (Manage Friends) event Click(), add this line of code :
    Save the project (Ctrl+S) then try the application to navigate to the display from (Display.Frm)
  • The new form has 3 buttons as shown in the photo, each button execute certain task (Update, Delete, Print) using the TextBoxes above.
  • All friends stored in the application's database (MyBook.mdb) will be listed in the (ListBox) control called (LstFrnds) so when you click on a name, it will be displayed on the form's textboxs corresponding to the tables field assigned to it.
  • Also you get to update the photo, by clicking on the (Image) control called (Timg) then clicking the [Update] button to store the new photo in the database table (Phones).
  • The form has some other features like :
    Displaying the current time and date of the Windows OS
    A background Image
    When you place the mouse cursor on a button, it displayes a text to ask you if you want to execute this button.
  • If you want to execute the Update process :
    Choose a friend from the ListBox, stored Data will be displayed on the form's textboxs
    Change any of the Data of the friend (Name, Phone, Home-Phone, Photo)
    Click on Update Button
    A messagebox will appear to let you know that the update process was successfully done.
  • If you want to execute the Delete process :
    Choose a friend from the ListBox, stored Data will be displayed on the form's textboxs
    Click on Delete Button
    A messagebox will appear to ask you whether you are sure to delete or now, click yes to confirm or cancel to cancel the process.
    A messagebox will appear to let you know that the Delete process was successfully done or not.
  • If you want to print the friends list on a Crystal Reports report then you click on the Print button. Crystal reports will be used in out application example source code to print out the friends list.
  • Before we start coding in the next part#5 we need to make sure that we have all the assets, one of those assets is the ADO2.8 techonology to connect the MS-Access 2003 with MS-Visual Basic 6.0, we will do this like that :

Using ADO2.8 in VB6
Make sure you close the project and open it again after saving everything

Part (5) - Visual Basic 6.0 code for MS-Access 2003

Thanx for reading, please feel free to leave a suggestion.

Labels :

Visual Basic, learning visual basic, visual basic training, visual basic for dummies, learn visual basic 2010, visual basic classes, visual basic coding, learn visual basic programming, learn visual basic online, visual basic programmer, visual basic help, help with visual basic, visual basic programming help, visual basic 2010 help, microsoft visual basic help, microsoft visual basic 6.0 help, vb programmers, Visual Basic 6.0, visual basic 6.0 software, visual basic 6.0 training, learn visual basic 6.0, ms visual basic 6.0, visual basic 6.0 pro, visual basic 6.0 learning edition, software of visual basic 6.0, how to learn visual basic 6.0, learning visual basic 6.0, visual basic 6.0 price.

Back