![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
02/04/2007, 16:53
|
![Avatar de abrahamvj](http://static.forosdelweb.com/customavatars/avatar144758_1.gif) | | | Fecha de Ingreso: julio-2006 Ubicación: Lima, Peru
Mensajes: 708
Antigüedad: 18 años, 6 meses Puntos: 18 | |
Re: FaceId en access Esto lo saque de un libor de access de McGraw hill. Pegalo en un modulo:
Option Explicit
Option Compare Database
Function cbshowbuttonfaceids(lngidstart As Long, lngidstop As Long)
Dim cbrnewtoolbar As commandbar
Dim cmdnewbutton As CommandBarButton
Dim intcntr As Integer
On Error Resume Next
Application.CommandBars("showfaceids").Delete
Set cbrnewtoolbar = Application.CommandBars.Add(Name:="showfaceids", temporary:=True)
For intcntr = lngidstart To lngidstop
Set cmdnewbutton = cbrnewtoolbar.Controls.Add(Type:=msocontrolbutton)
With cmdnewbutton
.faceid = intcntr
.tooltiptext = "Faceid= " & intcntr
End With
Next intcntr
With cbrnewtoolbar
.Width = 600
.Left = 100
.Top = 200
.Visible = True
End With
End Function
Ahora crea una macro, en Accion le colocas "Ejecutar codigo", en "nombre de funcion" colocas: cbshowbuttonfaceids (1, 500) (**500 o mas**), corre la macro y mira lo que ocurre1!!!
Abraham |