0% found this document useful (0 votes)
38 views3 pages

Sistema Monika

This document contains code for a Visual Basic program that manages a database of shoe information. It includes code to: 1) Connect to an Access database and define variables to store data. 2) Display a welcome form and allow navigation to other forms. 3) Search the database by shoe ID and populate textboxes with the matching record details. 4) Clear the textboxes to empty the search results. 5) Allow navigation from one form to the next.

Uploaded by

Naniiz Valdivia
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views3 pages

Sistema Monika

This document contains code for a Visual Basic program that manages a database of shoe information. It includes code to: 1) Connect to an Access database and define variables to store data. 2) Display a welcome form and allow navigation to other forms. 3) Search the database by shoe ID and populate textboxes with the matching record details. 4) Clear the textboxes to empty the search results. 5) Allow navigation from one form to the next.

Uploaded by

Naniiz Valdivia
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

COLEGIO DE EDUCACION PROFESIONAL TECNICA DEL ESTADO DE

CHIHUAHUA

6101-I

PSP.- ROCIO PINTO

Elaboración y mantenimiento de sistemas de Información

Mónica Vásquez Jiménez

Mat: 113-8

PRACTICA #3
Imports System.Data.OleDb
Public Class Form1
Public fila As Integer = 0
Dim dt As New DataTable
Dim mensa As String
Dim cn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\SISTEMA\sistema.mdb")

BIENVENIDA
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.Hide()
Dim fila As Integer = 0
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Form2.Show()
End Sub
End Class

BUSCAR
Private Sub cmdConsultar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cmdConsultar.Click
cn.Open()
dt.Reset()
Dim ConsultarDatos As String = "Select * From Zapatos Where Zapato=" & (CInt(txtZapatos.Text))
Dim dataAdapter As New OleDb.OleDbDataAdapter(ConsultarDatos, cn)
dataAdapter.Fill(dt)
fila = 0
txtModelo.Text = CInt(dt.Rows(fila)("Modelo"))
txtMarca.Text = CStr(dt.Rows(fila)("Marca"))
txtColor1.Text = CInt(dt.Rows(fila)("Color"))
txtNumero.Text = CInt(dt.Rows(fila)("Numero"))
txtCantidad.Text = CInt(dt.Rows(fila)("Cantidad"))
MsgBox(" Se encontro el registro correctamente", MsgBoxStyle.Information, " Mensaje")
dataAdapter.Dispose()
cn.Close()
End Sub

BORRAR
Private Sub cmdLimpiar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
cmdLimpiar.Click
txtModelo.Text = " "
txtMarca.Text = " "
txtColor.Text = " "
txtNumero.Text = " "
txtCantidad.Text = " "
End Sub
End Class

SIGUIENTE
Public Class Form2
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
Me.Hide()
Dim fila As Integer = 0
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Form3.Show()
End Sub
End Class

You might also like