You are on page 1of 22

MANUAL DE USO DEL

ALUMNOS DE INFORMATICA
ADMINISTRATIVA
SISTEMA

2010

EL MANUAL DE USO DEL SISTEMA ES UN METODO PARA DAR A


CONOCER LOS PUNTOS MÁS COMPLEJOS DE COMO ESTA
ESTRUCTURADO EL PROYECTO PARA QUE LOS NUEVOS
USUARIOS ESTEN IDENTIFICADOS CON CADA UNA DE LAS
FUNCIONES QUE REALIZA EL PROGRAMA.

INTEGRANTES
DENNIS CABRERA LECHUGA
MUEBLERIA BUDDY
GERARDO MELENDEZ FIDEL
764 767 16 25
LETICIA
CRUZ CARBALLO
http:\\muebleria-buddy.blogspot.com
INGENIERIA DEL SOFTWARE II

M A N U A L DE S I S T E M A
MUEBLERIA BUDDY

PANTALLA DE INICIO

Ilustración 1

Private Sub
Command1_Click() Form2.cmdnuevo.Visib Form2.cmdinventario.V
If Text1.Text <> "" le = False isible = True
Then End If Else
Tira = "Select * From
Tabla1" If rs(3) = "1" Then Form2.cmdinventario.V
Set rs = isible = False
BaseDatos.OpenRecor Form2.cmdentradas.Vi End If
dset(Tira) sible = True
With rs Else If rs(6) = "1" Then
.FindFirst "Usuario
='" & Text1.Text & "'" Form2.cmdentradas.Vi Form2.cmdmodificar.Vi
sible = False sible = True
If .NoMatch Then End If Else
MsgBox ("Este
usuario no esta If rs(4) = "1" Then Form2.cmdmodificar.Vi
registrado en las bases sible = False
de datos"), Form2.cmdsalidas.Visi End If
vbInformation, ble = True
"MUEBLERIA BUDDY" Else If rs(7) = "1" Then
Else
Form2.cmdsalidas.Visi Form2.cmdcredito.Visi
If rs(2) = "1" Then ble = False ble = True
End If Else
Form2.cmdnuevo.Visib
le = True If rs(5) = "1" Then Form2.cmdcredito.Visi
Else ble = False

MUEBLERIA Pá gina 2
INGENIERIA DEL SOFTWARE II
End If Direccion = App.Path
& "\bd_data.mdb" Form2.cmdinventario.V
If rs(8) = "1" Then Set BaseDatos = isible = False
OpenDatabase(Direcci End If
Form2.nuevo.Visible = on)
True If rs(6) = "1" Then
Else End Sub
Form2.cmdmodificar.Vi
Form2.nuevo.Visible = Private Sub sible = True
False Text1_KeyPress(KeyA Else
End If scii As Integer)
If KeyAscii = 13 Then Form2.cmdmodificar.Vi
If rs(9) = "1" Then sible = False
End If
Form2.cliente_modifica If Text1.Text <> ""
r2.Enabled = True Then If rs(7) = "1" Then
Else Tira = "Select * From
Tabla1" Form2.cmdcredito.Visi
Form2.cliente_modifica Set rs = ble = True
r2.Enabled = False BaseDatos.OpenRecor Else
End If dset(Tira)
With rs Form2.cmdcredito.Visi
If rs(10) = "1" Then .FindFirst "Usuario ble = False
='" & Text1.Text & "'" End If
Form2.usuario.Enable
d = True If .NoMatch Then If rs(8) = "1" Then
Else MsgBox ("Este
usuario no esta Form2.nuevo.Visible =
Form2.usuario.Enable registrado en las bases True
d = False de datos"), Else
End If vbInformation,
"MUEBLERIA BUDDY" Form2.nuevo.Visible =
If rs(11) = "1" Then Else False
End If
Form2.reg_movimiento If rs(2) = "1" Then
s.Visible = True If rs(9) = "1" Then
Else Form2.cmdnuevo.Visib
le = True Form2.cliente_modifica
Form2.reg_movimiento Else r2.Enabled = True
s.Visible = False Else
End If Form2.cmdnuevo.Visib
inicial.Show le = False Form2.cliente_modifica
End If r2.Enabled = False
If rs(12) = "1" Then End If
If rs(3) = "1" Then
Form2.cmdpagos.Visib If rs(10) = "1" Then
le = True Form2.cmdentradas.Vi
Else sible = True Form2.usuario.Enable
Else d = True
Form2.cmdpagos.Visib Else
le = False Form2.cmdentradas.Vi
End If sible = False Form2.usuario.Enable
inicial.Show End If d = False
End If
Unload Me If rs(4) = "1" Then
If rs(11) = "1" Then
End If Form2.cmdsalidas.Visi
End With ble = True Form2.reg_movimiento
Else Else s.Visible = True
MsgBox ("INGRESAR Else
USURIO"), Form2.cmdsalidas.Visi
vbInformation, ble = False Form2.reg_movimiento
"MUEBLERIA BUDDY" End If s.Visible = False
Text1.SetFocus End If
End If If rs(5) = "1" Then inicial.Show
End Sub
Form2.cmdinventario.V If rs(12) = "1" Then
Private Sub isible = True
Form_Load() Else Form2.cmdpagos.Visib
le = True

MUEBLERIA Pá gina 3
INGENIERIA DEL SOFTWARE II
Else MsgBox ("INGRESAR
Form2.reg_entrantes.V USUARIO"),
Form2.cmdpagos.Visib isible = False vbInformation,
le = False End If "MUEBLERIA BUDDY"
End If Text1.SetFocus
End If
If rs(13) = "1" Then inicial.Show

Form2.reg_entrantes.V Unload Me
isible = True End If
Else End If
End With End Sub
Else

Pantalla: inicial

Ilustración 2

Private Sub Form_Load()


ShockwaveFlash1.Movie = App.Path & "\ani.swf"
End Sub

Private Sub Movie1_GotFocus()


End Sub

Private Sub Timer1_Timer()


If Timer1.Interval = 3000 Then
Unload Me
Form2.Show
End If
End Sub

Pantalla: Principal

MUEBLERIA Pá gina 4
INGENIERIA DEL SOFTWARE II

Ilustración 3

Dim x, Y, xt, wt As End Sub


Integer
Dim accion As String Private Sub
Dim abrir As String cmdmodificar_Click() Adodc1.ConnectionStri
Public ope As Integer modificar.Show ng =
Public opcion As End Sub "Provider=Microsoft.Jet
Integer .OLEDB.4.0;" & _
Option Explicit Private Sub
Private Sub cmdnuevo_Click() "Data
cambio_usuario_Click( entradas.Show Source=..\MUEBLERIA
) End Sub BUDDY\sub_base_dat
contra.Show os." & _
Unload Me Private Sub
End Sub cmdpagos_Click() "MDB;Persist Security
ope = 1 Info=False"
Private Sub opcion = 0 With Adodc1
cliente_modificar2_Clic pagos.Show .CommandType =
k() End Sub adCmdText
mod_cliente.Show .RecordSource =
End Sub Private Sub "Select codigo, cliente,
cmdsalidas_Click() producto, cantidad,
Private Sub salidas.Show deuda, fecha_de_pago
cmdcredito_Click() End Sub From creditos"
creditos.Show
End Sub Private Sub .Refresh
Command1_Click() Set
Private Sub Form1.Show DataGrid1.DataSource
cmdentradas_Click() End Sub = Adodc1.Recordset
agregar.Show
End Sub DataGrid1.MarqueeSty
le =
Private Sub Private Sub dbgHighlightRowRaise
cmdinventario_Click() Form_Load() Cell
inventario.Show Text1.Text = Date

MUEBLERIA Pá gina 5
INGENIERIA DEL SOFTWARE II
.Visible = False Private Sub MsgBox
End With Timer1_Timer() Err.Description,
error_Handler: Text1.Text = Date vbCritical,
"MUEBLERIA BUDDY"
On Error GoTo End If
error_Handler
With Adodc1 Adodc1.ConnectionStri
If Text1 <> "" ng =
Then "Provider=Microsoft.Jet
.OLEDB.4.0;" & _
.Recordset.Filter = End Sub
Combo1 & " LIKE '*" + "Data
Text1 + "*'" Source=..\MUEBLERIA Private Sub
Set BUDDY\sub_base_dat usu_modificar_Click()
DataGrid1.DataSource os." & _ cuentas.usu.Visible =
= Adodc1.Recordset False
"MDB;Persist Security cuentas.txtpa.Visible =
Else Info=False" True
With Adodc1 cuentas.cmddescargar
.Recordset.Filter = "" .CommandType = .Visible = True
End If adCmdText cuentas.cmdnuevo.Visi
.Refresh .RecordSource = ble = False
End With "Select codigo, cliente, cuentas.Show
Exit Sub producto, cantidad, End Sub
If Err.Number = deuda, fecha_de_pago
3265 Then From creditos" Private Sub
MsgBox .Refresh usu_nuevo_Click()
"ERROR", vbCritical, Set cuentas.usu.Visible =
"MUEBLERIA BUDDY" DataGrid1.DataSource True
Else = Adodc1.Recordset cuentas.txtpa.Visible =
MsgBox False
Err.Description, DataGrid1.MarqueeSty cuentas.cmddescargar
vbCritical, le = .Visible = False
"MUEBLERIA BUDDY" dbgHighlightRowRaise cuentas.Show
End If Cell End Sub

.Visible = False
End With
Private Sub
Adodc1_Error( _
On Error GoTo ByVal ErrorNumber
End Sub error_Handler As Long, _
With Adodc1 Description As
Private Sub If Text1 <> "" String, _
new_credito_Click() Then ByVal Scode As
Long, _
End Sub .Recordset.Filter = ByVal Source As
Combo1 & " LIKE '*" + String, _
Private Sub Text1 + "*'" ByVal HelpFile As
nuevo_Click() Set String, _
new_cliente.Show DataGrid1.DataSource ByVal HelpContext
End Sub = Adodc1.Recordset As Long, _
fCancelDisplay As
Private Sub Else Boolean)
reg_entrantes_Click() MsgBox "
reg_entradas.Show .Recordset.Filter = "" DEscripción del Error :"
End Sub End If & Description
.Refresh End Sub
Private Sub End With
reg_movimientos_Click Exit Sub Private Sub
() error_Handler: Adodc2_MoveComplet
reg_mov.Show If Error.Number = e(ByVal adReason As
End Sub 3265 Then ADODB.EventReason
MsgBox "el Enum, ByVal pError As
Private Sub campo seleccionado ADODB.Error,
salir_Click() no es válido", adStatus As
End vbCritical, ADODB.EventStatusE
"MUEBLERIA BUDDY" num, ByVal
End Sub Else pRecordset As
ADODB.Recordset)

MUEBLERIA Pá gina 6
INGENIERIA DEL SOFTWARE II
Adodc1.Caption = " pRecordset As Case
Registro actual: " & ADODB.Recordset) adRsnUndoAddNew
CStr(Adodc1.Recordse Case
t.AbsolutePosition) Dim bCancel As adRsnUndoDelete
End Sub Boolean Case
Select Case adRsnUndoUpdate
Private Sub adReason Case adRsnUpdate
Adodc2_WillChangeRe Case adRsnAddNew End Select
cord(ByVal adReason Case adRsnClose
As Case adRsnDelete If bCancel Then
ADODB.EventReason Case adStatus =
Enum, ByVal cRecords adRsnFirstChange adStatusCancel
As Long, adStatus As Case adRsnMove End Sub
ADODB.EventStatusE Case adRsnRequery
num, ByVal Case adRsnResynch

Pago de clientes

Ilustración 4

Dim tabla3, Table As recepcion_pagos.lblcli recepcion_pagos.txtutil


Recordset ente.Caption = !cliente idad.Text = !utilidad
Public opcion As recepcion_pagos.lblpro
Integer ducto.Caption = ! End With
Public vaar As String producto End Sub
recepcion_pagos.lblde
Sub Recupera() uda.Caption = !deuda Sub SSQL()
recepcion_pagos.Sho recepcion_pagos.txtca sentencia = "Select
w ntidad.Text = !cantidad * From creditos Where
recepcion_pagos.lblfec codigo = '" &
With tabla3 ha.Caption = ! txtcodigo.Text & "'"
recepcion_pagos.lblco fecha_de_pago
digo.Caption = !codigo

MUEBLERIA Pá gina 7
INGENIERIA DEL SOFTWARE II
Set tabla3 = Private Sub
based.OpenRecordset( Command1_Click() If Form2.ope = 0 Then
sentencia) If Form2.opcion = 2
End Sub If txtcodigo.Text = "" Then
Then Call
Sub buscar() MsgBox (" NO prestamos.Buscar3
Call SSQL VALIDO"), Unload Me
With tabla3 "MUEBLERIA BUDDY" End If
If tabla3.RecordCount Else End If
<> 0 Then If Form2.ope = 1 Then vaar = txtcodigo.Text
If Form2.opcion = 0 End If
If Form2.ope = 1 Then Then End Sub
Call Recupera Call buscar
End If Unload Me Private Sub
Else End If Command2_Click()
x = MsgBox("ERROR End If Unload Me
EN LA BUSQUEDA", If Form2.ope = 0 Then End Sub
vbInformation, If Form2.opcion = 1
"MUEBLERIA Then Private Sub
BUDDY") Call Form_Load()
End If prestamos.buscar2 Call leer
End With Unload Me End Sub
End Sub End If
End If

Pantalla: nuevo producto

MUEBLERIA Pá gina 8
INGENIERIA DEL SOFTWARE II

Ilustración 5

Dim progA As "MUEBLERIA


Recordset Private Sub BUDDY")
Dim tabla4 As Command2_Click() Else
Recordset Unload Me x=
Dim opera As Integer End Sub MsgBox("REGISTRO
Public sw As Integer EXISTENTE",
Private Sub vbExclamation,
Private Sub Form_Load() "MUEBLERIA
Command1_Click() BUDDY")
If txtnombre.Text = "" Call leer End If
Or txtcompra.Text = "" opera = 1 End If
Or txtventa.Text = "" Or If opera = 2 Then
txtcantidad.Text = "" Label4.Caption = Date If prog_A.RecordCount
Then End Sub <> 0 Then
x = MsgBox("FALTAN Sub Guardar() prog_A.Edit
DATOS PARA Call Sentencia_SQL Call EscribirEnBase
FUNCIONAR", If opera = 1 Then Else
vbCritical, If progA.RecordCount x=
"MUEBLERIA = 0 Then MsgBox("REGISTRO
BUDDY") progA.AddNew EXISTENTE",
Else Call EscribirEnBase vbInformation,
sw = 2 x= "MUEBLERIA
Call Guardar MsgBox("AGREGADO BUDDY")
Unload Me CON EXITO", End If
End If vbInformation, End If
End Sub End Sub

MUEBLERIA Pá gina 9
INGENIERIA DEL SOFTWARE II
End With Private Sub
Sub Sentencia_SQL() End Sub txtcompra_KeyPress(K
sentencia = " eyAscii As Integer)
SELECT * FROM Private Sub a = KeyAscii
ingresos WHERE txtcantidad_KeyPress( If a = 46 Then
nombre = '" & KeyAscii As Integer) KeyAscii = 0
txtnombre.Text & "'" & a = KeyAscii ElseIf a < 0 Or a > 57
"" If a = 46 Then Then
Set progA = KeyAscii = 0 KeyAscii = 0
based.OpenRecordset( ElseIf a < 0 Or a > 57 End If
sentencia) Then
End Sub KeyAscii = 0 End Sub
End If
Sub EscribirEnBase() End Sub Private Sub
With progA Sub Sentencia_SQL4() txtventa_KeyPress(Ke
!nombre = sentencia = "Select yAscii As Integer)
txtnombre.Text * From movimientos a = KeyAscii
!precio_de_compra = Where fecha = '" & If a = 46 Then
txtcompra.Text txtfecha.Text & "'" KeyAscii = 0
!precio_de_venta = Set tabla4 = ElseIf a < 0 Or a > 57
txtventa.Text based.OpenRecordset( Then
!utilidad = txtventa.Text sentencia) KeyAscii = 0
- txtcompra.Text End Sub End If
!cantidad =
txtcantidad.Text End Sub
!utilidad = txtventa.Text
- txtcompra.Text
.Update

Pantalla: ingreso de mercancia

Ilustración 6

Public tabla As vbCritical,


Recordset Private Sub "MUEBLERIA
Public tabla2, tabla3 cmddescargar_Click() BUDDY")
As Recordset If txtpa.Text = "" Or Else
Public tabla4 As txtactual.Text = "" Or sw = 2
Recordset txtagregar.Text = "" Call Guardar
Public sw As Integer Then Call Guardar2
Public var1 As Single x = MsgBox("FALTAN Unload Me
Public var2 As Single DATOS PARA End If
Dim opera As Integer FUNCIONAR", End Sub

MUEBLERIA Pá gina 10
INGENIERIA DEL SOFTWARE II
End If
Private Sub Sub Sentencia_SQL() If sw = 2 Then
Command2_Click() sentencia = "Select If tabla.RecordCount
Unload Me * From ingresos <> 0 Then
End Sub WHERE nombre = '" & tabla.Edit
txtpa.Text & "'" Call Escribir
Private Sub Set tabla = x=
Form_Load() based.OpenRecordset( MsgBox("Operacion
Call leer sentencia) Exítosa",
sw = 1 End Sub vbInformation,
opera = 1 Sub DesplegarLista() "MUEBLERIA
crearLista Call Sentencia_SQL2 BUDDY")
Label6.Caption = Date With tabla2 Else
txtpa.Text = !nombre x = MsgBox("El
End Sub txtactual.Text = ! registro no existe",
cantidad vbCritical,
Sub crearLista() End With "MUEBLERIA
Set tabla2 = End Sub BUDDY")
based.OpenRecordset( End If
"ingresos") Sub Sentencia_SQL2() End If
If tabla2.RecordCount sentencia = "Select End Sub
<> 0 Then * From ingresos Where Sub Guardar2()
tabla2.MoveFirst nombre = '" & Call Sentencia_SQL3
Do While Not txtpa.Text & "'" tabla3.AddNew
tabla2.EOF Set tabla2 = Call Escribir2
txtpa.AddItem tabla2! based.OpenRecordset( End Sub
nombre sentencia)
tabla2.MoveNext End Sub Sub Escribir()
Loop Sub Sentencia_SQL3() With tabla
End If sentencia = "Select var1 = txtactual.Text
End Sub * From entradas var2 = txtagregar.Text
Where producto = '" & !cantidad = var1 + var2
Private Sub txtpa.Text & "'" !nombre = txtpa.Text
txtactual_KeyPress(Ke Set tabla3 = .Update
yAscii As Integer) based.OpenRecordset( End With
a = KeyAscii sentencia) End Sub
If a < 0 Or a > 57 Then End Sub
KeyAscii = 0 Sub Escribir2()
End If Sub Guardar() With tabla3
End Sub Call Sentencia_SQL Dim var1 As Long
If sw = 1 Then Dim var2 As Long
Private Sub If tabla.RecordCount =
txtagregar_KeyPress(K 0 Then var1 = txtactual.Text
eyAscii As Integer) tabla.AddNew var2 = txtagregar.Text
a = KeyAscii Call Escribir
If a = 46 Then x= !fecha =
KeyAscii = 0 MsgBox("Operacion Label6.Caption
ElseIf a < 0 Or a > 57 Exítosa", !producto = txtpa.Text
Then vbInformation, !cantidad_anterior =
KeyAscii = 0 "MUEBLERIA txtactual.Text
End If BUDDY") !cantidad_entrante =
Else txtagregar.Text
End Sub x = MsgBox("El !cantidad_total = var1
registro ya existe", + var2
Private Sub vbInformation,
txtpa_Click() "MUEBLERIA .Update
Call DesplegarLista BUDDY") End With
End Sub End If End Sub

Pantalla: venta de mercancias

MUEBLERIA Pá gina 11
INGENIERIA DEL SOFTWARE II

Ilustración 7

Public tabla As sw = 1
Recordset opera = 1
Public tabla2, tabla3 crearLista Private Sub
As Recordset crearLista2 txtactual_KeyPress(Ke
Public tabla4 As Label8.Caption = Date yAscii As Integer)
Recordset a = KeyAscii
Public tabla5 As End Sub If a < 0 Or a > 57 Then
Recordset KeyAscii = 0
Public sw As Integer Sub crearLista() End If
Public var1 As Single Set tabla2 = End Sub
Public var2 As Single based.OpenRecordset(
Dim opera As Integer "ingresos")
If tabla2.RecordCount Private Sub
Private Sub <> 0 Then txtagregar_KeyPress(K
cmddescargar_Click() tabla2.MoveFirst eyAscii As Integer)
If txtretirar.Text = "" Or Do While Not a = KeyAscii
txtventa.Text = "" Then tabla2.EOF If a = 46 Then
x = MsgBox("FALTAN txtpa.AddItem tabla2! KeyAscii = 0
DATOS PARA nombre ElseIf a < 0 Or a > 57
INICIAR", vbCritical, tabla2.MoveNext Then
"MUEBLERIA Loop KeyAscii = 0
BUDDY") End If End If
Else End Sub
sw = 2 Sub crearLista2() End Sub
Call Guardar Set tabla5 =
Call Guardarmov based.OpenRecordset( Private Sub
Unload Me "clientes") txtpa_Click()
End If If tabla5.RecordCount Call DesplegarLista
End Sub <> 0 Then End Sub
tabla5.MoveFirst Sub Sentencia_SQL()
Private Sub Do While Not sentencia = "Select
Command2_Click() tabla5.EOF * From ingresos Where
Unload Me txtclientes.AddItem nombre = '" &
End Sub tabla5!nombre txtpa.Text & "'"
tabla5.MoveNext Set tabla =
Private Sub Loop based.OpenRecordset(
Form_Load() End If sentencia)
Call leer End Sub End Sub

MUEBLERIA Pá gina 12
INGENIERIA DEL SOFTWARE II
txtclientes.Text = !no End If
Sub Sentencia_SQL2() txtempresa.Text = ! End If
sentencia = "Select empresa End Sub
* From ingresos Where Sub Guardarmov()
nombre = '" & End With Call Sentencia_SQL3
txtpa.Text & "'" End Sub tabla5.AddNew
Set tabla2 = Call Escribirmov
based.OpenRecordset( Sub Guardar() End Sub
sentencia) Call Sentencia_SQL
End Sub If sw = 1 Then Sub Escribir()
Sub Sentencia_SQL3() If tabla.RecordCount = With tabla
sentencia = "Select 0 Then var1 = txtactual.Text
* From mov" tabla.AddNew var2 = txtretirar.Text
Set tabla5 = Call Escribir !cantidad = var1 - var2
based.OpenRecordset( x = MsgBox("Nuevo !precio_de_venta =
sentencia) registro guardado", txtventa.Text
End Sub vbInformation, !nombre = txtpa.Text
Sub Sentencia_SQL4() "MUEBLERIA
sentencia = "Select BUDDY") .Update
* From clientes Where Else End With
nombre = '" & x = MsgBox("El End Sub
txtclientes.Text & "'" registro ya existe",
Set tabla4 = vbInformation, Sub Escribirmov()
based.OpenRecordset( "MUEBLERIA With tabla5
sentencia) BUDDY") !fecha =
End Sub End If Label8.Caption
End If !articulo = txtpa.Text
Sub DesplegarLista() If sw = 2 Then !cantidad =
Call Sentencia_SQL2 If tabla.RecordCount txtretirar.Text
With tabla2 <> 0 Then !VALOR =
txtpa.Text = !nombre tabla.Edit txtretirar.Text *
txtactual.Text = ! Call Escribir txtventa.Text
cantidad x= !vendido_a =
txtutilidad.Text = ! MsgBox("SENTENCIA txtclientes.Text
utilidad EJECUTADA", !valor_unitario =
txtventa.Text = ! vbInformation, txtventa.Text
precio_de_venta "MUEBLERIA !utilidad =
BUDDY") txtutilidad.Text *
End With Else txtretirar.Text
End Sub x = MsgBox("ERROR,
NO EXISTE", .Update
Sub Desplegar() vbCritical, End With
Call Sentencia_SQL4 "MUEBLERIA End Sub
With tabla4 BUDDY")

Pantalla: inventario

MUEBLERIA Pá gina 13
INGENIERIA DEL SOFTWARE II

Ilustración 8

ByVal Source As num, ByVal


Option Explicit String, _ pRecordset As
ByVal HelpFile As ADODB.Recordset)
Private Declare String, _
Function SetErrorMode ByVal HelpContext Dim bCancel As
Lib "kernel32" (ByVal As Long, _ Boolean
wMode As Long) As fCancelDisplay As Select Case
Long Boolean) adReason
Private Declare Sub Case adRsnAddNew
InitCommonControls MsgBox " Case adRsnClose
Lib "Comctl32" () DEscripción del Error :" Case adRsnDelete
& Description, Case
Private Sub "MUEBLERIA BUDDY" adRsnFirstChange
cmdall_Click() End Sub Case adRsnMove
infoinventario.Show Case adRsnRequery
Private Sub Case adRsnResynch
End Sub Adodc2_MoveComplet Case
e(ByVal adReason As adRsnUndoAddNew
Private Sub ADODB.EventReason Case
Command1_Click() Enum, ByVal pError As adRsnUndoDelete
Unload Me ADODB.Error, Case
End Sub adStatus As adRsnUndoUpdate
ADODB.EventStatusE Case adRsnUpdate
Private Sub num, ByVal End Select
Form_Initialize() pRecordset As
Call ADODB.Recordset) If bCancel Then
SetErrorMode(2) Adodc1.Caption = " adStatus =
Call Registro actual: " & adStatusCancel
InitCommonControls CStr(Adodc1.Recordse End Sub
End Sub t.AbsolutePosition)
End Sub
Private Sub Private Sub
Adodc1_Error( _ Private Sub Form_Load()
ByVal ErrorNumber Adodc2_WillChangeRe
As Long, _ cord(ByVal adReason
Description As As Adodc1.ConnectionStri
String, _ ADODB.EventReason ng =
ByVal Scode As Enum, ByVal cRecords "Provider=Microsoft.Jet
Long, _ As Long, adStatus As .OLEDB.4.0;" & _
ADODB.EventStatusE

MUEBLERIA Pá gina 14
INGENIERIA DEL SOFTWARE II
With Adodc1
"Data .Visible = False .CommandType =
Source=..\MUEBLERIA End With adCmdText
BUDDY\sub_base_dat .RecordSource =
os." & _ "Select * From
ingresos"
"MDB;Persist Security End Sub .Refresh
Info=False" Set
Private Sub DataGrid1.DataSource
With Adodc1 Timer1_Timer() = Adodc1.Recordset
.CommandType =
adCmdText Adodc1.ConnectionStri DataGrid1.MarqueeSty
.RecordSource = ng = le =
"Select * From "Provider=Microsoft.Jet dbgHighlightRowRaise
ingresos" .OLEDB.4.0;" & _ Cell
.Refresh
Set "Data .Visible = False
DataGrid1.DataSource Source=..\MUEBLERIA End With
= Adodc1.Recordset BUDDDY\sub_base_d
atos." & _
DataGrid1.MarqueeSty End Sub
le = "MDB;Persist Security
dbgHighlightRowRaise Info=False"
Cell

Modificar o eliminar

Ilustración 9

Public tabla As Public tabla4 As


Recordset Recordset Private Sub
Public tabla2, tabla3 Public sw As Integer cmddescargar_Click()
As Recordset Dim opera As Integer sw = 2

MUEBLERIA Pá gina 15
INGENIERIA DEL SOFTWARE II
Call Guardar ElseIf a < 0 Or a > 57
Unload Me Then End Sub
End Sub KeyAscii = 0
End If Sub Eliminar()
Private Sub Call Sentencia_SQL
Command1_Click() End Sub If tabla.RecordCount
sw = 2 <> o Then
Call Eliminar Private Sub x=
Unload Me txtpa_Click() MsgBox("¿ELIMENAR
End Sub Call DesplegarLista REGISTRO?",
End Sub vbYesNo,
Private Sub "MUEBLERIA
Command2_Click() Sub Sentencia_SQL() BUDDY")
Unload Me sentencia = "Select If x = vbYes Then
End Sub * From clientes tabla.Delete
WHERE nombre = '" & If tabla.BOF Then
Private Sub txtpa.Text & "'" tabla.MoveNext
Form_Load() Set tabla = Else
Call leer based.OpenRecordset( If tabla.EOF Then
sw = 1 sentencia) tabla.MovePrevious
opera = 1 End Sub Else
crearLista Sub DesplegarLista() tabla.MoveNext
Call Sentencia_SQL2 End If
End Sub With tabla2 x=
txtpa.Text = !nombre MsgBox("REGISTRO
Sub crearLista() txtnew.Text = !nombre ELIMINADO",
Set tabla2 = txtempresa.Text = ! vbInformation,
based.OpenRecordset( empresa "MUEBLERIA
"clientes") txttelefono.Text = ! BUDDY")
If tabla2.RecordCount telefono End If
<> 0 Then txtdireccion.Text = ! End If
tabla2.MoveFirst Direccion End If
Do While Not End Sub
tabla2.EOF
txtpa.AddItem tabla2! End With Sub Guardar()
nombre End Sub Call Sentencia_SQL
tabla2.MoveNext If sw = 1 Then
Loop Sub Sentencia_SQL2() If tabla.RecordCount =
End If sentencia = "Select 0 Then
End Sub * From clientes Where tabla.AddNew
nombre = '" & Call Escribir
Private Sub txtpa.Text & "'" x=
txtactual_KeyPress(Ke Set tabla2 = MsgBox("GUARDADO
yAscii As Integer) based.OpenRecordset( ", vbInformation)
a = KeyAscii sentencia) Else
If a < 0 Or a > 57 Then End Sub x = MsgBox("ERROR:
KeyAscii = 0 EL REGISTRO YA
End If Private Sub EXISTE",
End Sub txtutilidad_KeyPress(K vbInformation,
eyAscii As Integer) "MUEBLERIA
a = KeyAscii BUDDY")
Private Sub If a = 46 Then End If
txtcantidad_KeyPress( KeyAscii = 0 End If
KeyAscii As Integer) ElseIf a < 0 Or a > 57 If sw = 2 Then
a = KeyAscii Then If tabla.RecordCount
If a = 46 Then KeyAscii = 0 <> 0 Then
KeyAscii = 0 End If tabla.Edit
ElseIf a < 0 Or a > 57 Call Escribir
Then End Sub x=
KeyAscii = 0 MsgBox("MODIFICAD
End If Private Sub O CON EXITO",
txtventa_KeyPress(Ke vbInformation,
End Sub yAscii As Integer) "MUEBLERIA
a = KeyAscii BUDDY")
Private Sub If a = 46 Then Else
txtcompra_KeyPress(K KeyAscii = 0 x = MsgBox("ERROR",
eyAscii As Integer) ElseIf a < 0 Or a > 57 vbCritical)
a = KeyAscii Then End If
If a = 46 Then KeyAscii = 0 End If
KeyAscii = 0 End If End Sub

MUEBLERIA Pá gina 16
INGENIERIA DEL SOFTWARE II
!empresa = .Update
Sub Escribir() txtempresa.Text End With
With tabla !telefono = End Sub
!nombre = txtpa.Text txttelefono.Text
!nombre = txtnew.Text !Direccion =
txtdireccion.Text

Pantalla: ventas a credito

Ilustración 10

Private Sub
Public tabla As Private Declare Command2_Click()
Recordset Function SetErrorMode registro_movimientos.
Public tabla2, tabla3 Lib "kernel32" (ByVal Show
As Recordset wMode As Long) As End Sub
Public tabla4 As Long
Recordset Private Declare Sub
Public sw As Integer InitCommonControls Private Sub
Public var1 As Single Lib "Comctl32" () Command12_Click()
Public var2 As Single cartera.Show
Dim opera As Integer End Sub
Private Sub
Dim sentencia As Command1_Click() Private Sub
Variant mod_credito.Show Form_Initialize()
Dim x As Variant Unload Me Call
End Sub SetErrorMode(2)
Option Explicit

MUEBLERIA Pá gina 17
INGENIERIA DEL SOFTWARE II
Call Case
InitCommonControls adRsnUndoDelete .MoveNext
End Sub Case Label13.Caption =
adRsnUndoUpdate total
Private Sub Case adRsnUpdate
Adodc1_Error( _ End Select Loop
ByVal ErrorNumber
As Long, _ If bCancel Then End With
Description As adStatus = End Sub
String, _ adStatusCancel
ByVal Scode As End Sub Private Sub
Long, _ Text1_Change()
ByVal Source As On Error GoTo
String, _ Private Sub error_Handler
ByVal HelpFile As Form_Load() With Adodc1
String, _ Call leer If Text1 <> ""
ByVal HelpContext sw = 1 Then
As Long, _ opera = 1
fCancelDisplay As crearLista .Recordset.Filter =
Boolean) crearLista2 Combo1 & " LIKE '*" +
Label8.Caption = Date Text1 + "*'"
MsgBox " Set
DEscripción del Error :" Adodc1.ConnectionStri DataGrid1.DataSource
& Description, ng = = Adodc1.Recordset
"MUEBLERIA BUDDY" "Provider=Microsoft.Jet
End Sub .OLEDB.4.0;" & _ Else

Private Sub "Data .Recordset.Filter = ""


Adodc2_MoveComplet Source=..\MUEBLERIA End If
e(ByVal adReason As BUDDY\sub_base_dat .Refresh
ADODB.EventReason os." & _ End With
Enum, ByVal pError As Exit Sub
ADODB.Error, "MDB;Persist Security error_Handler:
adStatus As Info=False" If Err.Number =
ADODB.EventStatusE With Adodc1 3265 Then
num, ByVal .CommandType = MsgBox
pRecordset As adCmdText "ERROR", vbCritical,
ADODB.Recordset) "MUEBLERIA BUDDY"
Adodc1.Caption = " .RecordSource = Else
Registro actual: " & "Select * From MsgBox
CStr(Adodc1.Recordse creditos" "Err.Description",
t.AbsolutePosition) vbCritical,
End Sub .Refresh "MUEBLERIA BUDDY"
End If
Private Sub Set End Sub
Adodc2_WillChangeRe DataGrid1.DataSource
cord(ByVal adReason = Adodc1.Recordset
As Private Sub
ADODB.EventReason cmddescargar_Click()
Enum, ByVal cRecords DataGrid1.MarqueeSty If txtpa.Text = "" Or
As Long, adStatus As le = txtclientes.Text = "" Or
ADODB.EventStatusE dbgHighlightRowRaise txtventa.Text = "" Or
num, ByVal Cell txtutilidad.Text = "" Or
pRecordset As txtactual.Text = "" Or
ADODB.Recordset) .Visible = False txtretirar.Text = "" Or
End With txtcodigo.Text = ""
Dim bCancel As Then
Boolean With Combo1 x = MsgBox("FALTAN
Select Case DATOS PARA
adReason FUNCIONAR",
Case adRsnAddNew End With vbCritical,
Case adRsnClose Text1 = "" "MUEBLERIA
Case adRsnDelete BUDDY")
Case With Else
adRsnFirstChange Adodc1.Recordset sw = 1
Case adRsnMove Dim total As Long Call Guardar
Case adRsnRequery Do While Not .EOF Call Guardar2
Case adRsnResynch
Case Unload Me
adRsnUndoAddNew total = total + !deuda End If

MUEBLERIA Pá gina 18
INGENIERIA DEL SOFTWARE II
End Sub WHERE nombre = '" & ", vbInformation,
txtpa.Text & "'" "MUEBLERIA
Private Sub Set tabla = BUDDY")
Command10_Click() based.OpenRecordset( Else
Unload Me sentencia) x = MsgBox("NO
End Sub End Sub EXISTE", vbCritical,
Sub DesplegarLista() "MUEBLERIA
Sub crearLista() Call Sentencia_SQL2 BUDDY")
Set tabla2 = With tabla2 End If
based.OpenRecordset( txtventa.Text = !
"ingresos") precio_de_venta End Sub
If tabla2.RecordCount txtutilidad.Text = !
<> 0 Then utilidad Sub Escribir()
tabla2.MoveFirst txtactual.Text = ! With tabla3
Do While Not cantidad
tabla2.EOF End With !codigo =
txtpa.AddItem tabla2! End Sub txtcodigo.Text
nombre !cliente =
tabla2.MoveNext Sub Sentencia_SQL2() txtclientes.Text
Loop sentencia = "Select !producto = txtpa.Text
End If * From ingresos Where !cantidad =
End Sub nombre = '" & txtretirar.Text
txtpa.Text & "'" !deuda = txtretirar.Text
Set tabla2 = * txtventa.Text
Sub crearLista2() based.OpenRecordset( !fecha_de_pago =
Set tabla = sentencia) DTPicker1.Value
based.OpenRecordset( End Sub !utilidad =
"clientes") txtutilidad.Text
If tabla.RecordCount Sub Sentencia_SQL3()
<> 0 Then sentencia = "Select .Update
tabla.MoveFirst * From creditos " End With
Do While Not Set tabla3 = End Sub
tabla.EOF based.OpenRecordset(
txtclientes.AddItem sentencia) Sub Escribir2()
tabla!nombre End Sub With tabla2
tabla.MoveNext var1 = txtactual.Text
Loop Sub Guardar() var2 = txtretirar.Text
End If Call Sentencia_SQL3 !cantidad = var1 - var2
End Sub tabla3.AddNew !precio_de_venta =
Call Escribir txtventa.Text
Private Sub End Sub !nombre = txtpa.Text
txtpa_Click() Sub Guardar2()
Call DesplegarLista Call Sentencia_SQL2 .Update
End Sub If tabla2.RecordCount End With
<> 0 Then End Sub
Sub Sentencia_SQL() tabla2.Edit
sentencia = "Select Call Escribir2
* From clientes x=
MsgBox("EXCELENTE

Pantalla: movimientos

MUEBLERIA Pá gina 19
INGENIERIA DEL SOFTWARE II

Private Declare Case


Function MsgBox " adRsnAddNew
Ilustración 11
SetErrorMode Lib DESCRIPCION DEL Case adRsnClose
"kernel32" (ByVal ERROR" & Case adRsnDelete
wMode As Long) As Description, Case
Long "MUEBLERIA adRsnFirstChange
Private Declare Sub BUDDY" Case adRsnMove
InitCommonControls End Sub Case
Lib "Comctl32" () adRsnRequery
Private Sub Private Sub Case
Command10_Click() Adodc2_MoveCompl adRsnResynch
Unload Me ete(ByVal adReason Case
End Sub As adRsnUndoAddNew
ADODB.EventReaso Case
Private Sub nEnum, ByVal adRsnUndoDelete
Command2_Click() pError As Case
registro_movimiento ADODB.Error, adRsnUndoUpdate
s.Show adStatus As Case adRsnUpdate
End Sub ADODB.EventStatus End Select
Enum, ByVal
Private Sub pRecordset As If bCancel Then
Form_Initialize() ADODB.Recordset) adStatus =
Call Adodc1.Caption = adStatusCancel
SetErrorMode(2) " Registro actual: " & End Sub
Call CStr(Adodc1.Record
InitCommonControls set.AbsolutePosition
End Sub ) Private Sub
End Sub Form_Load()
Private Sub
Adodc1_Error( _ Private Sub Adodc1.ConnectionS
ByVal Adodc2_WillChange tring =
ErrorNumber As Record(ByVal "Provider=Microsoft.
Long, _ adReason As Jet.OLEDB.4.0;" & _
Description As ADODB.EventReaso
String, _ nEnum, ByVal "Data
ByVal Scode As cRecords As Long, Source=..\MUEBLE
Long, _ adStatus As RIA
ByVal Source As ADODB.EventStatus BUDDY\sub_base_d
String, _ Enum, ByVal atos." & _
ByVal HelpFile As pRecordset As
String, _ ADODB.Recordset) "MDB;Persist
ByVal Security Info=False"
HelpContext As Dim bCancel As
Long, _ Boolean With Adodc1
fCancelDisplay As Select Case .CommandType
Boolean) adReason = adCmdText

MUEBLERIA Pá gina 20
INGENIERIA DEL SOFTWARE II
.RecordSource total2 = total2 + ! Do While Not
= "Select * From utilidad .EOF
mov" total3 = total3 + ! total = total + !
cantidad VALOR
.Refresh .MoveNext .MoveNext
Label2.Caption = Label5.Caption =
Set total total
DataGrid1.DataSour Label6.Caption = Loop
ce = total2
Adodc1.Recordset Label8.Caption = End With
total3
DataGrid1.Marquee Loop Else
Style =
dbgHighlightRowRai .Recordset.Filter = ""
seCell End With End If
End Sub .Refresh
.Visible = False End With
End With Private Sub Exit Sub
Text1_Change() error_Handler:
With Combo1 On Error GoTo If Err.Number =
error_Handler 3265 Then
End With With Adodc1 MsgBox
Text1 = "" If Text1 <> "" "DATOS NO
Then VALIDOS",
vbCritical,
With .Recordset.Filter = "MUEBLERIA
Adodc1.Recordset Combo1 & " LIKE '*" BUDDY"
Dim total As + Text1 + "*'" Else
Long Set MsgBox
Dim total2 As DataGrid1.DataSour Err.Description,
Long ce = vbCritical,
Dim total3 As Adodc1.Recordset "MUEBLERIA
Long With BUDDY"
Adodc1.Recordset End If
Dim total As End Sub
Do While Not Long
.EOF
total = total + !
VALOR

ACCESO con permisos restringidos

En esta pantalla el usuario


tendra acceso solo a ver los
registros de entrada, siempre y
cuando no se modifiquen los
permisos de usuario.
Esto solo es el modelo de
cómo podria ser el acceso a
usuarios con permisos restringidos.

Ilustración 12

Otro ejemplo de pantalla son los demas tipos de usuarios


que en seguida se muestran

MUEBLERIA Pá gina 21
INGENIERIA DEL SOFTWARE II

USUARIO RESTRINGIDO
USUARIO RESTRINGIDO X
USUARIO RESTRINGIDO Y

MUEBLERIA Pá gina 22

You might also like