VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Congratulate a person on their birthday.

by Chedly Adel (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 25th March 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Congratulate a person on their birthday.

Rate Congratulate a person on their birthday.



'*******pour ajouter un client
Private Sub cdeajout_Click()
Dim Masque
Frame1.Visible = True
Image1.Visible = False
txtprenom.Visible = True
txtnom.Visible = True
txtrue.Visible = True
txtville.Visible = True
mskcod.Visible = True
cmbpays.Visible = True
dtpanniv.Visible = True
prenom.Visible = True
Label2.Visible = True
Label3.Visible = True
Label4.Visible = True
Label5.Visible = True
Label6.Visible = True
Label7.Visible = True
Datacardex.Recordset.AddNew
'cdeannul.Enabled = False
'cdevalid.Enabled = False
cdeannul.Enabled = True
cdevalid.Enabled = True
cdeajout.Enabled = False
txtprenom.Text = ""
txtnom.Text = ""
txtrue.Text = ""
txtville.Text = ""
Masque = mskcod.Mask
mskcod.Mask = ""
mskcod.Text = ""
mskcod.Mask = Masque
cmbpays.Text = ""

End Sub
'*******Affichage de la boite de dialogue recherche
Private Sub cderech_Click()
Form3.Show
End Sub
'*********Annuler l'opération
Private Sub cdeannul_Click()
rep = MsgBox("êtes-vous sûr de vouloir annuler l'opération encours?", vbQuestion + vbYesNo, "Annulation...")
If rep = vbYes Then
Datacardex.Recordset.CancelUpdate
'Text1.Text = " "
'Text2.Text = " "
'Text3.Text = " "
'Text4.Text = " "
'MaskEdBox1.Mask = " "
'Combo1.Text = " "
cdevalid.Enabled = False
cdeannul.Enabled = False
cdeajout.Enabled = True
End If
End Sub
'*********Quitter le programme
Private Sub cdequitter_Click()
cdeannul.Enabled = False
cdevalid.Enabled = False
End
End Sub
'**********l'enregistrement dans le base
Private Sub cdevalid_Click()

'Datacardex.Recordset.AddNew
On Error GoTo Erreur
Datacardex.Recordset.Update
cdeannul.Enabled = False
cdevalid.Enabled = False
cdeajout.Enabled = True
Exit Sub
Erreur:
MsgBox Err.Description, vbCritical
End Sub
'**********initialisation des cases
Private Sub Form_Load()
Dim Masque
cdeannul.Enabled = False
cdevalid.Enabled = False
txtprenom.Text = ""
txtnom.Text = ""
txtrue.Text = ""
txtville.Text = ""
Masque = mskcod.Mask
mskcod.Mask = ""
mskcod.Text = ""
mskcod.Mask = Masque
cmbpays.Text = ""
End Sub


'********Liberation des commande estompé
Private Sub txtprenom_Change()
'If txtprenom.Text <> " " Then
'cdeannul.Enabled = True
'cdevalid.Enabled = True
'End If
End Sub




Dim Mois As Byte

Private Sub Combo1_Click()
 Select Case Combo1.Text
   Case "Janvier": Mois = 1
   Case "Fevrier": Mois = 2
   Case "Mars": Mois = 3
   Case "Avril": Mois = 4
   Case "Mai": Mois = 5
   Case "Juin": Mois = 6
   Case "Juillet": Mois = 7
   Case "Aout": Mois = 8
   Case "Septembre": Mois = 9
   Case "Octtobre": Mois = 10
   Case "Novembre": Mois = 11
   Case "Decembre": Mois = 12
 End Select
End Sub

Private Sub Command1_Click()
  ' Vous pouvez remplacer la variable Mois par l'expression suivante :
  ' Combo1.ListIndex + 1
  req = "Select * From Client " _
      & " Where month(Anniverssaire) = " & Combo1.ListIndex + 1 'Mois
  Form4.DataRECH.RecordSource = req
  Form4.DataRECH.Refresh
  Form1.Frame1.Visible = False
  Form4.Show
  Form4.MSFlexGrid1.Visible = True
  Unload Me
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command1_Click()
Unload Me
End Sub

Private Sub Command2_Click()
Form4.PrintForm
End Sub






Download this snippet    Add to My Saved Code

Congratulate a person on their birthday. Comments

No comments have been posted about Congratulate a person on their birthday.. Why not be the first to post a comment about Congratulate a person on their birthday..

Post your comment

Subject:
Message:
0/1000 characters