Bonjour,
Je réalise des tests pour mieux maitriser le SQL.
Voici mon code (function dans un module)
'Fonction pour faire ses tests pour la recherche en SQL
Public Function trouverInscription(numero As Integer) As Boolean
Dim bds As dao.Database
Dim rstable As dao.Recordset
Dim variable As Integer
Set bds = CurrentDb
Set rstable = bds.OpenRecordset("SELECT * FROM inscriptions where num_activite=numero;")
MsgBox (rstable.RecordCount)
'If rstable.RecordCount <> 0 Then
'trouverInscription = True
' MsgBox (rstable.RecordCount)
'End If
End Function
j'appelle la function comme ceci :
Module2.trouverInscription (81)
j'ai plein d'erreur à la compilation.
Pouvez-vous m'aider ?
Je réalise des tests pour mieux maitriser le SQL.
Voici mon code (function dans un module)
'Fonction pour faire ses tests pour la recherche en SQL
Public Function trouverInscription(numero As Integer) As Boolean
Dim bds As dao.Database
Dim rstable As dao.Recordset
Dim variable As Integer
Set bds = CurrentDb
Set rstable = bds.OpenRecordset("SELECT * FROM inscriptions where num_activite=numero;")
MsgBox (rstable.RecordCount)
'If rstable.RecordCount <> 0 Then
'trouverInscription = True
' MsgBox (rstable.RecordCount)
'End If
End Function
j'appelle la function comme ceci :
Module2.trouverInscription (81)
j'ai plein d'erreur à la compilation.
Pouvez-vous m'aider ?