You are on page 1of 8

VERSION 5.

00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form6
BackColor = &H00808000&
Caption = "Reportes Bodega"
ClientHeight = 5475
ClientLeft = 120
ClientTop = 465
ClientWidth = 6030
LinkTopic = "Form6"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5475
ScaleWidth = 6030
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command5
Caption = "Imprimir"
BeginProperty Font
Name = "Nirmala UI"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 600
TabIndex = 14
Top = 4920
Width = 2055
End
Begin VB.CommandButton Command4
Caption = "&Salir"
BeginProperty Font
Name = "Nirmala UI"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 3360
TabIndex = 13
Top = 4920
Width = 2055
End
Begin VB.OptionButton Option2
Caption = "Producto"
BeginProperty Font
Name = "MV Boli"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 4080
TabIndex = 12
Top = 960
Width = 1215
End
Begin VB.OptionButton Option1
Caption = "C�digo"
BeginProperty Font
Name = "MV Boli"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 2880
TabIndex = 11
Top = 960
Width = 975
End
Begin VB.TextBox Text7
BeginProperty Font
Name = "MV Boli"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 1080
TabIndex = 10
Top = 1440
Width = 3855
End
Begin VB.CommandButton Command3
Caption = "&Buscar"
BeginProperty Font
Name = "MV Boli"
Size = 11.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 720
TabIndex = 9
Top = 960
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "Siguiente"
BeginProperty Font
Name = "Nirmala UI"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3360
TabIndex = 7
Top = 4200
Width = 2055
End
Begin VB.CommandButton Command1
Caption = "Anterior"
BeginProperty Font
Name = "Nirmala UI"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 600
MaskColor = &H0000FFFF&
TabIndex = 6
Top = 4200
Width = 2055
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 1680
Top = 5640
Width = 3975
_ExtentX = 7011
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "Bodega"
Caption = ""
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox Text6
DataField = "S_Final"
DataSource = "Adodc1"
BeginProperty Font
Name = "MV Boli"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3360
TabIndex = 5
Top = 3480
Width = 2055
End
Begin VB.TextBox Text5
Appearance = 0 'Flat
BorderStyle = 0 'None
BeginProperty Font
Name = "NSimSun"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 720
Locked = -1 'True
TabIndex = 4
Text = "Saldo Final"
Top = 3480
Width = 1335
End
Begin VB.TextBox Text4
DataField = "Producto"
DataSource = "Adodc1"
BeginProperty Font
Name = "MV Boli"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3360
TabIndex = 3
Top = 2880
Width = 2055
End
Begin VB.TextBox Text3
Appearance = 0 'Flat
BorderStyle = 0 'None
BeginProperty Font
Name = "NSimSun"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 720
Locked = -1 'True
TabIndex = 2
Text = "Producto"
Top = 2880
Width = 1215
End
Begin VB.TextBox Text2
DataField = "Codigo"
DataSource = "Adodc1"
BeginProperty Font
Name = "MV Boli"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3360
TabIndex = 1
Top = 2280
Width = 2055
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Gothic"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 720
Locked = -1 'True
TabIndex = 0
Text = "C�digo"
Top = 2280
Width = 975
End
Begin VB.Line Line1
X1 = 0
X2 = 5880
Y1 = 1920
Y2 = 1920
End
Begin VB.Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "Reportes Bodega"
BeginProperty Font
Name = "Niagara Solid"
Size = 20.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 0
TabIndex = 8
Top = 240
Width = 6015
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then
Adodc1.Recordset.MoveFirst
End If
End Sub

Private Sub Command2_Click()


Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveLast
End If
End Sub

Private Sub Command3_Click()


Dim mensaje As String
'Verificar que este seleccionado una Opcion
If Option1.Value = False And Option2.Value = False Then
mensaje = MsgBox("Selecciona la opcion de Busqueda", vbCritical, "Opcion de
Busquea")
'Verifica que la caja de texto a buscar no este Vacia
ElseIf Text7.Text = "" Then
mensaje = MsgBox("Rellena la Casilla para la Busqueda", vbCritical, "Rellenar
Casilla")
Else

If Option1.Value = True Then


If Not (IsNumeric(Text7.Text)) Then
mensaje = MsgBox("Escribe solo Numeros para la Busqueda de N�mero",
vbCritical, "Ingresar solo Numeros")
Text7.Text = ""
Text7.SetFocus
Else
'Buscar por C�digo
Adodc1.Recordset.Find "Codigo = '" & Text7.Text & "'", , , 1
End If
End If
If Option2.Value = True Then
'Buscar por Producto
Adodc1.Recordset.Find "Producto = '" & Text7.Text & "'", 1
End If

'Buscar Recorriendo Inicio y Final de los Registros


If Adodc1.Recordset.BOF = False And Adodc1.Recordset.EOF = False Then
Text2.Text = Adodc1.Recordset.Fields("Codigo")
Text4.Text = Adodc1.Recordset.Fields("Producto")
Text6.Text = Adodc1.Recordset.Fields("S_Final")
Text7.Text = ""
Text7.SetFocus
Else
mensaje = MsgBox("No se a podido localizar el registro", vbCritical,
"Localizacion Fallida")
Adodc1.Recordset.MoveFirst
Text7.Text = ""
Text7.SetFocus
End If

End If
End Sub

Private Sub Command4_Click()


Unload Me
End Sub

Private Sub Command5_Click()


Printer.FontSize = 26
Printer.Orientation = 1
Printer.Print Tab(12)
Printer.Print Text1.Text
Printer.Print Text2.Text
Printer.Print Text3.Text
Printer.Print Text4.Text
Printer.Print Text5.Text
Printer.Print Text6.Text
End Sub

You might also like