Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Eliminar y Modificar Mediante Sql

publicado

Hola a todos, me pueden ayudar con el tema de como eliminar y modificar mediante sql. pues un listbox carga los datos mediante consulta sql, yo quiero eliminar el dato q se encuentra seleccionado en el listbox, trate con este código pero me da error. me puede ayudar. muchas gracias por su apoyo.

Application.ScreenUpdating = False
Dim MyArray() As String
Dim Fila As Integer
Dim i As Long
Dim Rw As Integer
Dim Columna As Integer
Dim Rst16 As New ADODB.Recordset
Dim Cnx16 As New ADODB.Connection
Dim Consulta16 As String, UltFila As Long, NombreHoja As String
'Dim IdCodigo As String ',
Dim Codigos As String

Codigos = FrmPersonal.ListBox1.List(FrmPersonal.ListBox1.ListIndex, 0)
'Desc = frm_orden.CbServicio.Text
If Trim(Codigos) = "" Then Exit Sub
Cnx16.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ThisWorkbook.Path & "\" & ThisWorkbook.Name & _
";Extended Properties=""Excel 12.0 Xml;HDR=YES"";"
Hoja4.Select
NombreHoja = Hoja4.Name
UltFila = Hoja4.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Consulta16 = "Delete FROM [" & NombreHoja & "$A1:U" & UltFila & "] where [Codigo] = '" & Codigos & "'"

Rst16.Open Consulta16, Cnx16, 1, 1
Rst16.Close
Set Rst16 = Nothing
Cnx16.Close
Set Cnx16 = Nothing
[/CODE]

Featured Replies

No hay posts para mostrar

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.