- Private Sub CargaDatosGrid(Selection as string, NmFichero as string, Condicion1 as string, Condicion2 as string, Condicion3 as string) 
-   
- Dim SqlGrid As String 
- Dim nCon As Integer 
- Dim TextoGrid As String 
-   
- GridBusca.Rows = 1 
- GridBusca.Cols = NumColumnas + 1 
- SqlGrid = "" 
- SqlGrid = SqlGrid + " SELECT " + Selection + " FROM " + NmFichero 
- If Condition1 <> "" Then 
-     SqlGrid = SqlGrid + " WHERE " + Condition1 
- End If 
- If Condition2 <> "" Then 
-     SqlGrid = SqlGrid + " AND " + Condition2 
- End If 
- If Condition3 <> "" Then 
-     SqlGrid = SqlGrid + " AND " + Condition3 
- End If 
-   
- Set TbGrid = Conect.Execute(SqlGrid) 
- 'Tbgrid = Recordset 
- 'Conect = Connection 
-   
- Set GridBusca.DataSource = TbGrid 
-   
- CargaPosiciones 
-   
- End Sub 
-