Y a-t-il des différences entre le langage VBA Français et la langage VBA Anglais (Office Access 2016)
Bonjour a tous
Merci d'avance
Mon problème et comme suite , j'ai recoupé une application totalement en Français dans un office Access Anglais
toutes marche Bien ( les Table ; Les Formulaires ........?) mais quand j'ai recoupé les code Vba j'ai obtiens des erreur
parme les codes comme suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Private Sub liste_clients_Change()
Dim ligne As Recordset: Dim base As Database
Set base = Application.CurrentDb
Set ligne = base.OpenRecordset('SELECT * FROM Clients WHERE N°_client=' & liste_clients.Value, dbOpenDynaset)
ligne.MoveFirst
n_client.Value = liste_clients.Value
civilite.Value = ligne.Fields('civilite_client').Value
nom_client.Value = ligne.Fields('nom_client').Value
prenom_client.Value = ligne.Fields('prenom_client').Value
ligne.Close
base.Close
Set ligne = Nothing
Set base = Nothing
End Sub |
=======
et le 2° Code
===
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| Private Sub creer_client_Click()
Dim base As Database: Dim ligne As Recordset
Dim nb_clients As Byte: Dim requete As String
If (civilite.Value <> '' And nom_client.Value <> '' And prenom_client.Value <> '') Then
Set base = Application.CurrentDb
Set ligne = base.OpenRecordset('SELECT COUNT(N°_client) AS nb_client FROM Clients WHERE nom_client='' & nom_client.Value & '' AND prenom_client='' & prenom_client & ''', dbOpenDynaset)
ligne.MoveFirst
nb_clients = ligne.Fields('nb_client').Value
If (Int(nb_clients > 0)) Then
MsgBox ('Le client existe déjà, il ne peut donc être créé une deuxième fois')
Else
requete = 'INSERT INTO Clients (civilite_client,nom_client,prenom_client) VALUES ('' & civilite.Value & '','' & nom_client.Value & '','' & prenom_client.Value &'')'
base.Execute requete
MsgBox 'Le client a été créé avec succès'
DoCmd.Requery
liste_clients = liste_clients.ItemData(liste_clients.ListCount - 1)
n_client.Value = liste_clients.Value
ligne.Close
base.Close
Set ligne = Nothing
Set base = Nothing
End If
Else
MsgBox 'Pour créer un nouveau client, toutes les informations des champs doivent être renseignées'
End If
End Sub |
======
j'en sais pas s'il juste de modification de point ou des , ou d'autre chose
Merci pour votre aide
:oops::oops::oops: