1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Function GetInfo(U As String, T As String, S As String)
Dim sql As String
Dim acApp As Access.Application
Dim chemin As String
Dim nmt As String
xml = Value1
'nom de la table
nmt = Value2
' Démarrer Access
Set acApp = New Access.Application
' Ouvrir la base de données concernée
acApp.OpenCurrentDatabase (chemin & "nom.mdb")
sql = "SELECT C FROM [" & nmt & " ] WHERE S = " & Chr(34) & U & Chr(34) & " and Sc=" & Chr(34) & S & Chr(34)
Get Info=currentDb.execute(sql)
End Function |
Partager