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.

Crear grafico en formulario excel desde database access

publicado

Hola a todos,

Quiero hacer una Consulta

tengo una base de datos en access y los datos se muestran en formulario excel. estoy trabajando con ADO

Deseo crear un grafico de indicadores en un formulario vba llamando a una consulta desde access es posible hacer esto. alguien que me de una manito.

Saludos,

Featured Replies

publicado
  • Autor

hola siguiendo con el tema estoy trabajando con un control chartspace para crear graficos en formularios consultando a un base de datos de access. lo que deseo hacer es crear un grafico con los valores de la tabla

dejo ejemplo de mi avance si alguien me puede echar una manito le estare agradecido

Slds,

ejemplo1.rar

publicado
  • Autor

estuve avanzando y esta quedando ya mejor pero tengo un problema deseo que aparezca el año y las barras pero solo toma el primer registro alguien que me de una manito..

dejo codigo

Private Sub Command1_Click()

Dim myChtObj As ChartObject

' Add a series to collection


Chart.Visible = True

' Filtramos los Registros de la BD en base a el año seleccionado
Set Rs = cnn.Execute("SELECT * FROM ventas")
' Calculamos el Porcentaje de las Ventas
' Esperadas y Logradas
nEsperado = Rs.Fields("Esperado")
nLogrado = Rs.Fields("Logrado")
nanio = Rs.Fields("Año")
' Colocamos el titulo al Chart

Set c = Chart.Constants
Set mychart = Chart.Charts.Add
With mychart

'Add a legend to the bottom of the pie chart
.HasLegend = True
.Legend.Position = chLegendPositionBottom
'Add a title to the chart
.HasTitle = True
.Title.Caption = "Datos Cuantitativo del Año " '& Rs.Fields("AÑO")
.Title.Font.Bold = True
.Title.Font.Size = 8
.WidthRatio = 50
End With


'--------------------------------------------------------------------------
mychart.Type = c.chChartTypeColumnClustered
Rs.MoveFirst
Do While Rs.EOF = False
mychart.SeriesCollection.Add
With mychart.SeriesCollection(0)
.SetData c.chDimSeriesNames, c.chDataLiteral, nanio
.SetData c.chDimCategories, c.chDataLiteral, nEsperado
.SetData c.chDimValues, c.chDataLiteral, nLogrado
End With
Rs.MoveNext
Loop
Rs.Close
Set Rs = Nothing



End Sub[/CODE]

esta es la imagen :

post-161684-145877016999_thumb.png

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.