VERSION 5.00
Begin VB.Form Fprueba 
   Caption         =   "Form1"
   ClientHeight    =   2220
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6255
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   2220
   ScaleWidth      =   6255
   Begin VB.CommandButton Command5 
      Caption         =   ">"
      Height          =   255
      Left            =   4680
      TabIndex        =   8
      Top             =   1560
      Width           =   1215
   End
   Begin VB.CommandButton Command4 
      Caption         =   ">>"
      Height          =   255
      Left            =   3120
      TabIndex        =   7
      Top             =   1560
      Width           =   1215
   End
   Begin VB.CommandButton Command3 
      Caption         =   "<<"
      Height          =   255
      Left            =   1560
      TabIndex        =   6
      Top             =   1560
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "<"
      Height          =   255
      Left            =   240
      TabIndex        =   5
      Top             =   1560
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1080
      TabIndex        =   4
      Text            =   "Text2"
      Top             =   840
      Width           =   3015
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   1200
      TabIndex        =   2
      Text            =   "Text1"
      Top             =   360
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   375
      Left            =   4680
      TabIndex        =   0
      Top             =   240
      Width           =   975
   End
   Begin VB.Label Label3 
      Caption         =   "Label3"
      Height          =   255
      Left            =   2760
      TabIndex        =   9
      Top             =   360
      Width           =   1335
   End
   Begin VB.Label Label2 
      Caption         =   "Label2"
      Height          =   375
      Left            =   120
      TabIndex        =   3
      Top             =   840
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   360
      Width           =   1335
   End
End
Attribute VB_Name = "Fprueba"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private RS As ADODB.Recordset

Public GrecibeUbicacion As BookmarkEnum
Public GrecibeColumnaID As String

Private Sub Actualiza()
  Text1.Text = RS!GROUPID
  Text2.Text = RS!GROUPNAME
End Sub
Private Sub Command1_Click()
  'Lineas que llaman al Formulario de Búsqueda
  
  Dim ArrayBusqueda(1 To 2, 1 To 3) As Variant
  ArrayBusqueda(1, 1) = "groupid"
  ArrayBusqueda(1, 2) = "Código de Grupo"
  ArrayBusqueda(1, 3) = 1000
  
  ArrayBusqueda(2, 1) = "groupname"
  ArrayBusqueda(2, 2) = "Descripción de Grupo"
  ArrayBusqueda(2, 3) = 6000
    
        
  FBusquedasInv.GObtenerRegistros RS, ArrayBusqueda, 2, 2
  FBusquedasInv.Show vbModal
  
  If GrecibeUbicacion <> 0 Then
   RS.AbsolutePosition = GrecibeUbicacion
   Label3.Caption = GrecibeColumnaID
  End If
  Actualiza
  
End Sub

Private Sub Command2_Click()
  RS.MoveFirst
  Actualiza
End Sub

Private Sub Command3_Click()
On Error Resume Next
  RS.MovePrevious
  Actualiza
End Sub

Private Sub Command4_Click()
On Error Resume Next
  RS.MoveNext
  Actualiza
End Sub

Private Sub Command5_Click()
  RS.MoveLast
  Actualiza
End Sub

Private Sub Form_Load()
  Dim con As Connection
  Set con = New Connection
  con.Provider = "SQLOLEDB"
  con.ConnectionString = "data source=persiesf01;initial catalog=sies57;user id=sa;password="
  con.Open
  
  Set RS = New Recordset
  RS.CursorLocation = adUseClient
  RS.Open "Select *  from SE_GroupRec", con, adOpenStatic
End Sub
