home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form CoInfo
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- Caption = "Company Information"
- ClientHeight = 5685
- ClientLeft = 690
- ClientTop = 1395
- ClientWidth = 7365
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 1
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 6090
- KeyPreview = -1 'True
- Left = 630
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5685
- ScaleWidth = 7365
- Top = 1050
- Width = 7485
- Begin VB.TextBox txtCoName
- DataField = "CompanyName"
- DataSource = "datCoInfo"
- Height = 285
- Left = 2520
- TabIndex = 1
- Top = 480
- Width = 3855
- End
- Begin VB.TextBox txtCoAddr1
- DataField = "Address1"
- DataSource = "datCoInfo"
- Height = 285
- Left = 2520
- TabIndex = 2
- Top = 840
- Width = 3855
- End
- Begin VB.TextBox txtCoAddr2
- DataField = "Address2"
- DataSource = "datCoInfo"
- Height = 285
- Left = 2520
- TabIndex = 3
- Top = 1200
- Width = 3855
- End
- Begin VB.TextBox txtCoCity
- DataField = "City"
- DataSource = "datCoInfo"
- Height = 285
- Left = 2520
- TabIndex = 4
- Top = 1560
- Width = 1455
- End
- Begin VB.TextBox txtCoState
- DataField = "State"
- DataSource = "datCoInfo"
- Height = 285
- Left = 2520
- TabIndex = 5
- Top = 1920
- Width = 1455
- End
- Begin VB.TextBox txtCoPhone
- DataField = "Phone"
- DataSource = "datCoInfo"
- Height = 285
- Left = 2520
- TabIndex = 7
- Top = 3000
- Width = 1815
- End
- Begin VB.TextBox txtCoFax
- DataField = "FAX"
- DataSource = "datCoInfo"
- Height = 285
- Left = 2520
- TabIndex = 8
- Top = 3360
- Width = 1815
- End
- Begin VB.TextBox txtCoSlogan
- DataField = "CompanySlogan"
- DataSource = "datCoInfo"
- Height = 285
- Left = 1920
- TabIndex = 9
- Top = 4080
- Width = 4455
- End
- Begin VB.TextBox txtZip
- DataField = "Zip"
- DataSource = "datCoInfo"
- Height = 285
- Left = 2520
- TabIndex = 6
- Top = 2280
- Width = 1455
- End
- Begin VB.Data datCoInfo
- Appearance = 0 'Flat
- Caption = "CoInfo"
- Connect = ""
- DatabaseName = "C:\VBPROJ\SAMS\VB4DB.MDB"
- Exclusive = 0 'False
- Height = 270
- Left = 240
- Options = 0
- ReadOnly = 0 'False
- RecordsetType = 1 'Dynaset
- RecordSource = "CoInf"
- Top = 5145
- Visible = 0 'False
- Width = 2415
- End
- Begin VB.CommandButton Command1
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "&Close"
- Height = 615
- Left = 2880
- TabIndex = 0
- TabStop = 0 'False
- Top = 4920
- Width = 1335
- End
- Begin VB.Label Label9
- Alignment = 1 'Right Justify
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- Caption = "Zip:"
- ForeColor = &H80000008&
- Height = 255
- Left = 1680
- TabIndex = 18
- Top = 2280
- Width = 735
- End
- Begin VB.Label Label8
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- Caption = "Company slogan:"
- ForeColor = &H80000008&
- Height = 255
- Left = 360
- TabIndex = 17
- Top = 4080
- Width = 1575
- End
- Begin VB.Label Label7
- Alignment = 1 'Right Justify
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- Caption = "FAX:"
- ForeColor = &H80000008&
- Height = 255
- Left = 1200
- TabIndex = 16
- Top = 3360
- Width = 1215
- End
- Begin VB.Label Label6
- Alignment = 1 'Right Justify
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- Caption = "Phone:"
- ForeColor = &H80000008&
- Height = 255
- Left = 1200
- TabIndex = 15
- Top = 3000
- Width = 1215
- End
- Begin VB.Label Label5
- Alignment = 1 'Right Justify
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- Caption = "State:"
- ForeColor = &H80000008&
- Height = 255
- Left = 1800
- TabIndex = 14
- Top = 1920
- Width = 615
- End
- Begin VB.Label Label4
- Alignment = 1 'Right Justify
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- Caption = "City:"
- ForeColor = &H80000008&
- Height = 255
- Left = 1920
- TabIndex = 13
- Top = 1560
- Width = 495
- End
- Begin VB.Label Label3
- Alignment = 1 'Right Justify
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- Caption = "Address line 2:"
- ForeColor = &H80000008&
- Height = 255
- Left = 1080
- TabIndex = 12
- Top = 1200
- Width = 1335
- End
- Begin VB.Label Label2
- Alignment = 1 'Right Justify
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- Caption = "Address line 1:"
- ForeColor = &H80000008&
- Height = 255
- Left = 1080
- TabIndex = 11
- Top = 840
- Width = 1335
- End
- Begin VB.Label Label1
- Alignment = 1 'Right Justify
- Appearance = 0 'Flat
- BackColor = &H00C0C0C0&
- Caption = "Company name:"
- ForeColor = &H80000008&
- Height = 255
- Left = 960
- TabIndex = 10
- Top = 480
- Width = 1455
- End
- Attribute VB_Name = "CoInfo"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub btnAddCust_Click()
- Unload CoInfo
- End Sub
- Private Sub Command1_Click()
- Unload Me
- End Sub
- Private Sub Form_Activate()
- Dim SQLinq
- ' Reset to the default pointer when returning to this form.
- MousePointer = 0
- SQLinq = "SELECT * FROM COINF;"
- datCoInfo.RecordSource = SQLinq
- datCoInfo.Refresh
- If datCoInfo.Recordset.RecordCount <> 0 Then
- Exit Sub
- Else
- datCoInfo.Recordset.AddNew
- datCoInfo.Recordset.Update
- End If
- End Sub
- Private Sub Form_KeyPress(KeyAscii As Integer)
- ' While not a Windows standard, the client
- ' prefers to use the enter key to move from field to field.
- ' This subroutine should trap the keypress and
- ' and process all "ENTER" keys as "TAB"
- If KeyAscii = 13 Then
- SendKeys "{tab}"
- KeyAscii = 0
- End If
- End Sub
- Private Sub Form_Load()
- 'Center the form
- Left = (Screen.Width - Width) / 2
- Top = (Screen.Height - Height) / 2
- datCoInfo.DatabaseName = Database_name
- End Sub
-