Merci pour ta rapidité. j'avais estimé que le code n'a aucun interet, ce dernier est d'un classissime et en plus il marche parfaitement sous access/jet
'/////////////// dans le module ///////////////////////////// Set ConPi = New ADODB.Connection ConPi.CursorLocation = adUseClient 'adUseServer StrMysqCon = "DRIVER={MySQL ODBC 5.1 Driver};SERVER=" & MYSQLSERVER & ";PORT=3306;DATABASE=" & MYSQLDB_Agenda & ";USER=" & MYSQLUSER & ";PASSWORD=" & MYSQLPWD & "" ConPi.Open StrMysqCon '/////////////// dans le module /////////////////////////////
Private Sub Planning1_HeureFixeDblClick() On Error GoTo fin Requete_Client = "select Id, Objet, Date_début, Heure_début, Date_fin, Heure_fin, " & _ "Commercial, Observation, Famille, Imagefond, Nroaffaire, Rappelavant, Numéro_client, Type_planification, " & _ "Heure_prochain_rappel, Adresse, Ville, Téléphone "
Select Case Planning1.AgendaPlanning Case "Agenda", "Planning-commandes" frmAgenda.Show With frmAgenda.Adodc1 .LockType = adLockPessimistic ' j'ai tenté de verrouiller içi sans succès .ConnectionString = ConPi .RecordSource = Requete_Client & " from agenda where id = " & frmplanning.Planning1.numero_document & "" .Refresh End With frmAgenda.txtobjet.SelStart = Len(frmAgenda.txtobjet.Text) Case "Planning-interventions" Rechercher_click Planning1.numero_document End Select Exit Sub fin: Trape_Erreur Me.name, "Planning1_HeureFixeDblClick" End Sub
|