Bouton valider
sya21
Messages postés
426
Date d'inscription
Statut
Membre
Dernière intervention
-
sya21 Messages postés 426 Date d'inscription Statut Membre Dernière intervention -
sya21 Messages postés 426 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
jai du code vb qui me permet d'inserer ou de supprimer des enregistrements dans une table lorque je clique sur le bouton valider , cependant mon code ne marche pas et je ne trouve pas l'erreur mercu de m'aider
Private Sub Cmd_valid_Click()
On Error GoTo Err_cmd_valid_Click
If chx <> "a" Then
lst_id.Visible = False
lst_nom = ""
Else
lst_id.Visible = True
lst_nom.Visible = False
End If
If chx <> "s" Then
If chx = "a" Then
End If
End If
DoCmd.RunCommand acCmdRecordsGoToNew
lst_id.Requery
lst_id = ""
Now.RowSource = "SELECT avril09.* from avril09; "
Me.Refresh
If chx = "m" Or "a" Then
dmcmd.RunSQL "insert into avril09(division,section,entité_pilotage,identifiant,UP,Nom,Prenom,Agent_Sexe,Grade,Clasniv_grade,n°_fonction,libelle_fonction,clasniv_fct,Agent_Statut,Date_naissance,quotite) values('" & Me.division & "," & Me.section & " , " & Me.[entité pilotage] & " , " & Me.identifiant & " , " & Me.UP & " , " & Me.Prenom & " , " & Me.[Agent Sexe] & " , " & Me.Grade & " , " & Me.clasniv_grade & " , " & Me.[n° fonction] & " , " & Me.Libelle_fonction & " , " & Me.clasniv_fct & " , " & Me.[Agent Statut] & " , " & Me.[Date naissance] & " , " & Me.quotite & "' )"
End If
If chx = "s" Then
dmcmd.RunSQL "delete avril09.* from avril09 where identifiant = " & CLng(lst_id.Value)
DoCmd.RunSQL req
DoCmd.Close acForm, "frm_personnel"
End Sub
jai du code vb qui me permet d'inserer ou de supprimer des enregistrements dans une table lorque je clique sur le bouton valider , cependant mon code ne marche pas et je ne trouve pas l'erreur mercu de m'aider
Private Sub Cmd_valid_Click()
On Error GoTo Err_cmd_valid_Click
If chx <> "a" Then
lst_id.Visible = False
lst_nom = ""
Else
lst_id.Visible = True
lst_nom.Visible = False
End If
If chx <> "s" Then
If chx = "a" Then
End If
End If
DoCmd.RunCommand acCmdRecordsGoToNew
lst_id.Requery
lst_id = ""
Now.RowSource = "SELECT avril09.* from avril09; "
Me.Refresh
If chx = "m" Or "a" Then
dmcmd.RunSQL "insert into avril09(division,section,entité_pilotage,identifiant,UP,Nom,Prenom,Agent_Sexe,Grade,Clasniv_grade,n°_fonction,libelle_fonction,clasniv_fct,Agent_Statut,Date_naissance,quotite) values('" & Me.division & "," & Me.section & " , " & Me.[entité pilotage] & " , " & Me.identifiant & " , " & Me.UP & " , " & Me.Prenom & " , " & Me.[Agent Sexe] & " , " & Me.Grade & " , " & Me.clasniv_grade & " , " & Me.[n° fonction] & " , " & Me.Libelle_fonction & " , " & Me.clasniv_fct & " , " & Me.[Agent Statut] & " , " & Me.[Date naissance] & " , " & Me.quotite & "' )"
End If
If chx = "s" Then
dmcmd.RunSQL "delete avril09.* from avril09 where identifiant = " & CLng(lst_id.Value)
DoCmd.RunSQL req
DoCmd.Close acForm, "frm_personnel"
End Sub
A voir également:
- Bouton valider
- Diagnostic bouton photo - Accueil - Outils
- Bouton shift pc - Forum Jeux vidéo
- Réinitialiser chromecast sans bouton - Guide
- Bouton couleur telecommande - Guide
- Bouton reinitialisation pc - Guide