Accueil > > > ASHSoft_annutel/enr.frm
ANNUTEL3.5
ASHSoft_annutel/enr.frm
Informations sur ce code source
Enfin je décide de partager un tout petit programme pour gérer les contacts téléphoniques, avec possibilité de de modification, de suppression et d'impression!
Fichier : ASHSoft_annutel/enr.frm
Nombre de lignes : 336 lignes
Afficher ce fichier en plein écran
- VERSION 5.00
- Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
- Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
- Begin VB.Form enr
- BorderStyle = 0 'None
- Caption = "Form1"
- ClientHeight = 4470
- ClientLeft = 0
- ClientTop = 0
- ClientWidth = 7515
- ControlBox = 0 'False
- Icon = "enr.frx":0000
- LinkTopic = "Form1"
- Picture = "enr.frx":0442
- ScaleHeight = 4470
- ScaleWidth = 7515
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 'CenterScreen
- Begin VB.ComboBox cbo_ann
- BeginProperty Font
- Name = "Arial"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 360
- Left = 5790
- Style = 2 'Dropdown List
- TabIndex = 6
- Top = 510
- Width = 1605
- End
- Begin VB.TextBox txt_nom
- Appearance = 0 'Flat
- BackColor = &H00FFFFFF&
- BorderStyle = 0 'None
- BeginProperty Font
- Name = "Arial"
- Size = 14.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00004080&
- Height = 315
- Left = 570
- TabIndex = 0
- Top = 960
- Width = 6825
- End
- Begin VB.TextBox txt_ad
- Appearance = 0 'Flat
- BackColor = &H00FFFFFF&
- BorderStyle = 0 'None
- BeginProperty Font
- Name = "Arial"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00004080&
- Height = 315
- Left = 570
- TabIndex = 1
- Top = 1590
- Width = 6825
- End
- Begin VB.TextBox txt_tel
- Appearance = 0 'Flat
- BackColor = &H00FFFFFF&
- BorderStyle = 0 'None
- BeginProperty Font
- Name = "Arial"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00004080&
- Height = 315
- Left = 570
- TabIndex = 2
- Top = 2190
- Width = 6825
- End
- Begin VB.TextBox txt_not
- Appearance = 0 'Flat
- BackColor = &H00FFFFFF&
- BorderStyle = 0 'None
- BeginProperty Font
- Name = "Arial"
- Size = 11.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = -1 'True
- Strikethrough = 0 'False
- EndProperty
- ForeColor = &H00004080&
- Height = 945
- Left = 570
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 3
- Top = 2850
- Width = 6825
- End
- Begin MSDataGridLib.DataGrid DataGrid2
- Bindings = "enr.frx":5F18
- Height = 525
- Left = 570
- TabIndex = 7
- Top = 3840
- Visible = 0 'False
- Width = 375
- _ExtentX = 661
- _ExtentY = 926
- _Version = 393216
- HeadLines = 1
- RowHeight = 15
- BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = -1 'True
- Strikethrough = 0 'False
- EndProperty
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = -1 'True
- Strikethrough = 0 'False
- EndProperty
- ColumnCount = 2
- BeginProperty Column00
- DataField = ""
- Caption = ""
- BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
- Type = 0
- Format = ""
- HaveTrueFalseNull= 0
- FirstDayOfWeek = 0
- FirstWeekOfYear = 0
- LCID = 1036
- SubFormatType = 0
- EndProperty
- EndProperty
- BeginProperty Column01
- DataField = ""
- Caption = ""
- BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
- Type = 0
- Format = ""
- HaveTrueFalseNull= 0
- FirstDayOfWeek = 0
- FirstWeekOfYear = 0
- LCID = 1036
- SubFormatType = 0
- EndProperty
- EndProperty
- SplitCount = 1
- BeginProperty Split0
- BeginProperty Column00
- EndProperty
- BeginProperty Column01
- EndProperty
- EndProperty
- End
- Begin MSAdodcLib.Adodc adc_tel
- Height = 330
- Left = 990
- Top = 3900
- Visible = 0 'False
- Width = 1200
- _ExtentX = 2117
- _ExtentY = 582
- ConnectMode = 0
- CursorLocation = 3
- IsolationLevel = -1
- ConnectionTimeout= 15
- CommandTimeout = 30
- CursorType = 3
- LockType = 3
- CommandType = 2
- CursorOptions = 0
- CacheSize = 50
- MaxRecords = 0
- BOFAction = 0
- EOFAction = 0
- ConnectStringType= 1
- Appearance = 1
- BackColor = -2147483643
- ForeColor = -2147483640
- Orientation = 0
- Enabled = -1
- Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=BASE.mdb;Persist Security Info=False"
- OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=BASE.mdb;Persist Security Info=False"
- OLEDBFile = ""
- DataSourceName = ""
- OtherAttributes = ""
- UserName = ""
- Password = ""
- RecordSource = "CONTACT"
- Caption = "Adodc1"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = -1 'True
- Strikethrough = 0 'False
- EndProperty
- _Version = 393216
- End
- Begin VB.Label lab_val
- BackStyle = 0 'Transparent
- Height = 435
- Left = 4890
- MouseIcon = "enr.frx":5F2E
- MousePointer = 99 'Custom
- TabIndex = 4
- Top = 3900
- Width = 1095
- End
- Begin VB.Label lab_quit
- BackStyle = 0 'Transparent
- Height = 435
- Left = 6270
- MouseIcon = "enr.frx":67F8
- MousePointer = 99 'Custom
- TabIndex = 5
- Top = 3900
- Width = 1095
- End
- End
- Attribute VB_Name = "enr"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Form_Load()
- On Error Resume Next
- Dim i, j As Integer
- Dim an_actu As Integer
-
- an_actu = Format(Now, "yyyy")
- For i = an_actu To 2010 Step -1
- cbo_ann.AddItem i
- Next i
- If cbo_ann.ListCount > 0 Then
- cbo_ann.Text = cbo_ann.List(0)
- End If
-
- End Sub
-
- Private Sub lab_quit_Click()
- Dim X As Long
- Dim i As Long
- i = 10
- For X = Me.Height To 450 Step -i
- DoEvents
- Me.Move Me.Left, Me.Top + (i \ 2), Me.Width, X
- Next X
- For X = Me.Width To 1000 Step -i
- DoEvents
- Me.Move Me.Left + (i \ 2), Me.Top, X, Me.Height
- Next X
- MENU.Show
- Unload Me
- End Sub
-
- Private Sub lab_val_Click()
- On Error Resume Next
- 'déclarations
- Dim code As String
- code = txt_nom.Text
- 'validation de données
- If Trim(txt_nom.Text) = "" Then
- MsgBox "Nom et prénoms obligatoires.", vbOKOnly + vbExclamation, "Champ vide"
- txt_nom.SetFocus
- Exit Sub
- End If
- If Trim(txt_ad.Text) = "" Then
- MsgBox "Adresse obligatoire.", vbOKOnly + vbExclamation, "Champ vide"
- txt_ad.SetFocus
- Exit Sub
- End If
- If Trim(txt_tel.Text) = "" Then
- MsgBox "Numéro de téléphone obligatoire.", vbOKOnly + vbExclamation, "Champ vide"
- txt_tel.SetFocus
- Exit Sub
- End If
- 'ENREGISTREMENT
- With adc_tel.Recordset
- .AddNew
- .Fields("nom").Value = (txt_nom.Text)
- .Fields("adresse").Value = (txt_ad.Text)
- .Fields("tel").Value = (txt_tel.Text)
- If txt_not.Text = "" Then
- .Fields("info").Value = ""
- Else
- .Fields("info").Value = (txt_not.Text)
- End If
- .Fields("an").Value = (cbo_ann.Text)
- .Update
- End With
- adc_tel.Refresh
- MENU.adc_tel.Refresh
- txt_nom.Text = ""
- txt_ad.Text = ""
- txt_tel.Text = ""
- txt_not.Text = ""
- MENU.cbo_ann = Format(Now, "yyyy")
- MENU.lab_to.Caption = "CONTACTS ENREGISTRES = " & MENU.adc_tel.Recordset.RecordCount
- MENU.adc_tel.Recordset.Sort = "nom"
- MsgBox "Enregistrement effectué avec succès.", vbOKOnly + vbInformation, "Enregistrement de " & code
- txt_nom.SetFocus
-
- End Sub
|