Etxezarreta
Member
- Local time
- Today, 06:46
- Joined
- Apr 13, 2020
- Messages
- 175
Hi All,
I want to populate an existing query with some vba code, but the compliation shows me an error: I habe been looking for an answer in the forum, but still clueless, any suggestion please?
May thanks!
I want to populate an existing query with some vba code, but the compliation shows me an error: I habe been looking for an answer in the forum, but still clueless, any suggestion please?
May thanks!
Code:
str_SQL_finale = " SELECT t_ListeContacts.ID_Contact, t_ListeContacts.Nom_contact, t_ListeContacts.Prenom_contact, re_DernRdv.MaxDeDate_rdv AS DateDernRdv, t_ListeContacts.Nom_structure, t_ListeContacts.Fonction, t_Specialite.Specialite, t_IntitulesProfession.Profession, t_ListeContacts.Ville, t_ListeContacts.Departement, t_ListeContacts.Adresse_1" _
& " FROM t_Specialite INNER JOIN (t_IntitulesProfession INNER JOIN (t_ListeContacts INNER JOIN re_DernRdv ON t_ListeContacts.ID_Contact = re_DernRdv.FK_contact) ON t_IntitulesProfession.ID_Profession = t_ListeContacts.FK_Profession) ON t_Specialite.ID_Specialite = t_ListeContacts.FK_Specialite" _
& " WHERE " & strAllCriteria & " "
objConnection.Execute (str_SQL_finale)
QueryDefs("reCrRdv").SQL = str_SQL_finale 'HERE IS MY PROBLEM'
Me.Refresh
objConnection.Close
Set objConnection = Nothing