Private Sub Command1_Click(Index As Integer)
Select Case Index
Case 0
Consulta a 'a = Parametro de la funcion
Case 1
Consulta b 'b = Parametro de la funcion
Case 2
Consulta c 'c = Parametro de la funcion
End Select
End Sub
Private Function Consulta(Parametro As String)
Dim rs As New ADODB.Recordset
Dim SQL As String
SQL = "SELECT Campo FROM Tabla WHERE Clave = '" & Parametro & "'"
' todo lo demás
End Function