Application developed with Access 2002, Part 4.


4th Step,  About Form.

Operations:

  1. Create About
    From the KJV2002:Database dialog box displays, Choose and Click The Tab - Forms and then click New.
    From the new dialog box - New Form displays, Select Design Form and then click Open
    The Form Design displays, From the File menu click Save, the new dialog box - Save as displays, Type About (name form) and then click Ok
    Add controls to the About form
  2. Modify About
    From the KJV2002:Database dialog box displays, Choose and Click The Tab - Forms, Select About and then click Design.
    Use the Toolbox to add new control
    From the View menu click Code, to Add the Code

The design.


About Object and controls

  1. The About, Form Properties:
    default View:
    Auto Center:
    Min Max Buttons:
    Navigation Buttons:

    Pop Up:
    Modal:
    On Load:
    Single Form
    Yes
    None
    No

    Yes
    Yes
    (Event Procedure)


  2. Add the file
     From the ...\A2002 Html\Pic folder (downloaded ...) copy the (BMP Image) diam1.bmp  file  to the folder C:\A2002\ res.
     
  3. Add the following controls, from the Toolbox :
    One Image, three Labels, one Line control and one Command Button
    1. Add the Image - Image1 Properties:
      Use the Image control to display a graphic. An Image control can display a graphic from a bitmap, icon, or metafile, as well as enhanced metafile, JPEG, or GIF files.
      Name:
      Picture:
      Visible:
      Image1
      (none)
      Yes


      No
      te:
      The image1
      displays the file diam1.bmp , stored in the folder C:\A2002\res
       

    2. Add the Label - LbKJV2002 Properties:
      A Label control is a graphical control you can use to display text that a user can't change directly.
      Name:
      Caption:
      Font:
      lbKJV2002
      KJV database Access 2002, Info
      Times New Roman, Bold, Und..., size = 9


    3. Add the Label - lintroduction1 Properties:
      A Label control is a graphical control you can use to display text that a user can't change directly.
      Name:
      Caption:
      Font:
      lintroduction1
      Introduction1...
      Times New Roman, Bold, size = 9


    4. Add the Label - lintroduction2 Properties:
      A Label control is a graphical control you can use to display text that a user can't change directly.
      Name:
      Caption:
      Font:
      lintroduction2
      Introduction2 ...
      Times New Roman, Bold, size = 9


    5. Add the Line - Line1 Properties:
      Use on a form or report, for example, to emphasize related or especially important information.
      Name:
      Border Width:
      Line1
      2pt


    6. Add the Command Button -CmdClosee Properties:
      Use a CommandButton control to begin, interrupt, or end a process. When chosen, a CommandButton appears pushed in and so is sometimes called a push button.
      Name:
      Caption:
      On Click
      CmdClose
      Close
      (Event Procedure)
  4. About Form,The Codes

     the new text Code to be add is red.
    Option Compare Database
    '************************************
    Private Sub CmdClose_Click()
    On Error GoTo Err_CmdClose_Click


    DoCmd.Close

    Exit_CmdClose_Click:
    Exit Sub

    Err_CmdClose_Click:
    MsgBox Err.Description
    Resume Exit_CmdClose_Click

    End Sub
    '************************************
    Private Sub Form_Load()

    Dim cn1 As ADODB.Connection
    Dim rsTableBible1 As ADODB.Recordset

    '
    Load the picture - diam1.bmp
    Image1.Picture = CurrentProject.Path & "\res\diam1.bmp"


    '
    Open connection.
    Set cn1 = New ADODB.Connection
    Set cn1 = Application.CurrentProject.Connection

    '
    Open RecordSet
    Set rsTableBible1 = New ADODB.Recordset

    rsTableBible1.Open "select Book,TextData from BibleTable ", cn1, adOpenStatic, adLockOptimistic


    With rsTableBible1
    .Move (0) ' First record
    '
    lintroduction.Caption displays the information about the file KJV.mdb, stored in the 1st KJV database record.
    lintroduction1.Caption = .Fields(1).Value
    End With
    '
    lintroduction.Caption displays the information about Created all Forms.
    lIntroduction2.Caption = ."All forms created by Chucri Simon Zouein"

    End Sub

     


Note:

To run this application,
(Run the Microsoft Access 2002, from File menu, click Open, from the Open dialog box displays, select KJV2002 file of the folder C:\A2002 and click Open.)
from the KJV2002 Database dialog box displays, Choose and Click The Tab - Forms, select MainForm and then click Open.


Previous
  Home
4