Airfield Models - Visual Basic Database

Converting VB DB to a Daily Quote Applet (Developer's Version) - Step 5

December 19, 2021



Home
About
Site Feedback
Register
Contact
Site Map
Add to Favorites
Comments
Search Airfield Models

Back to VB DB

 

Airfield Models (http://www.airfieldmodels.com/)Converting VB DB to a Daily Quote Applet
(Developer's Version)

Download VB DB Source Code here.

 
 

Step 5 of 7

Remove all TextBoxes, CheckBoxes, ListBoxes and CommandButtons from frmDatabase.frm.  Also remove all the labels except lblField(0) and lblField(1).

Note:  Do not remove the ImageList or CommonDialog controls.

In the Code view for frmDatabase, look through the code and delete any remnants of code for the controls that were removed.  This code is easily found by looking in the Declarations ComboBox in the top-right of the code window.

Before conversion

Add two TextBoxes to the form and name them txtQuote and txtAuthor respectively.  It is important that the correct label be placed with each TextBox.  Captions for labels are changed dynamically at run-time based on the field definitions you have set up.  For lblField(0) set the Caption property to "Quote."  For lblField(1) set the Caption to "Author."

Note:  Labels are associated with the FIELD_INDEX Enum.  The first item you enter in the Enum is associated with lblField(0).  Each subsequent lblField is indexed in the same order as the Enum.  If the labels do not have the correct caption for the control they are associated with, do not change the code move the label!

After conversion

Be sure to set the TabIndex property for each control so the controls "tab" properly.

You may want to rename the form to something other than frmDatabase.frm.  I renamed it to frmQuote.frm.  Don't forget to change the form caption.

In each TextBox, add the following code to the Changed Event:

' frmDatabase.frm

Private Sub txtQuote_Change()

Changed = True

End Sub

Private Sub txtAuthor_Change()

Changed = True

End Sub

You should remove the following subs from frmDatabase in addition to the control events that need to be removed:

  • AddArrayElement
  • DeleteArrayElement
  • EditArrayElement
  • PopulateArrayList
 
 

Previous —
Next —

Step 4 of Converting VB DB to a Daily Quote Applet (Developer's Version)
Step 6 of Converting VB DB to a Daily Quote Applet (Developer's Version)

Comments about VBDB

 
 

Back to VB DB
Airfield Models Home

 
 

Copyright © 2002-2005 Paul K. Johnson