Private Sub Form_Open(Cancel As Integer)
Dim SQL As String, sSourcePar As String, sSourcePeriodes As String
Dim cnUtil As New ADODB.Connection
SQL = "SELECT ..."
cnUtil.Open sDemelerChaine(sConnUtil)
cnQual.Open sDemelerChaine(sConnQual)
rsP.CursorLocation = adUseClient
rsP.Open SQL, cnUtil, adOpenStatic
rsPer.Open "tbPériodeLieux", cnQual
Set Me.Recordset = rsP
DoCmd.Maximize
End Sub
|