rosalia lara
TRANSCRIPT
Nombre: Rosalía Lara Santos
Grupo: 606
Especialidad: Informática
Ing. Agustín Hernández Delgado
Aquí se encuentra un avance correspondido a los botones Buscar y Grabar
Código de Buscar y Grabar
Dim i As Integer Dim bandera As Boolean bandera = True Dim tamano As Integer RegistroBindingSource.MoveFirst() tamano = RegistroBindingSource.Count() Dim res As Boolean Dim a As String Dim b As String i = 1
a = UCase(Trim(RFCTextBox.Text)) b = UCase(Trim(TextBox1.Text))
If (tamano = 0) Then MsgBox("Tabla Vacia") Else RegistroBindingSource.MoveFirst() ' a = UCase(Trim(RFCTextBox.Text)) Do res = a Like b If (res = True) Then bandera = False Else RegistroBindingSource.MoveNext()
a = UCase(Trim(RFCTextBox.Text)) i = i + 1 End If Loop While (bandera = True And i <= tamano)
End If If (bandera = True) Then IdTextBox.Enabled = False RFCTextBox.Enabled = False Nombre_de_la_empresaTextBox.Enabled = False DireccionTextBox.Enabled = False LocalidadTextBox.Enabled = False ProvinciaTextBox.Enabled = False Codigo_postalTextBox.Enabled = False TelefonoTextBox.Enabled = False Pagina_webTextBox.Enabled = False
IdTextBox.Visible = False RFCTextBox.Visible = False Nombre_de_la_empresaTextBox.Visible = False
DireccionTextBox.Visible = False LocalidadTextBox.Visible = False ProvinciaTextBox.Visible = False Codigo_postalTextBox.Visible = False TelefonoTextBox.Visible = False Pagina_webTextBox.Visible = False
MsgBox("NO HAY DATOS")
Else IdTextBox.Enabled = False RFCTextBox.Enabled = False Nombre_de_la_empresaTextBox.Enabled = False DireccionTextBox.Enabled = False LocalidadTextBox.Enabled = False ProvinciaTextBox.Enabled = False Codigo_postalTextBox.Enabled = False TelefonoTextBox.Enabled = False Pagina_webTextBox.Enabled = False
IdTextBox.Visible = True RFCTextBox.Visible = True Nombre_de_la_empresaTextBox.Visible = True DireccionTextBox.Visible = True LocalidadTextBox.Visible = True
ProvinciaTextBox.Visible = True Codigo_postalTextBox.Visible = True TelefonoTextBox.Visible = True Pagina_webTextBox.Visible = True
nuevafila(1) = UCase(TextBox1.Text) nuevafila(2) = Val(RFCTextBox.Text)
End If
End Sub
Para el botón de grabar