RE:Botones que toman la imágen de una BD
Hay dos formas en la puedes hacerlo, grabar en la tabla un campo Path donde grabarías la direccion donde se encuentran las imagenes para asi tomar la ruta, ejemplo:
Private Sub cmdDibujo_Click()
sql = "Select * From Imagenes "
Registro
Rec.Open sql, cnbase
If Rec.RecordCount > 0 Then
'Rec!Path = "C:\Imagenes\Foto.jpg"
cmdDibujo.Picture = LoadPicture(Rec!Path)
End If
End Sub
Sub Registro()
If Rec.State = adStateOpen Then Rec.Close
Rec.CursorLocation = adUseClient
Rec.CursorType = adOpenDynamic
Rec.LockType = adLockOptimistic
End Sub
Private Sub Form_Load()
Conectar
End Sub
Sub Conectar()
On Error GoTo Errores
Dim Ruta As String
Dim NomBase As String
NomBase = "BDIMAGEN.mdb" 'Nombre de la BD de ACCESS
Ruta = App.Path & "\" & NomBase 'Direccion donde se encuentra tu BD de ACCESS
Conexion = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & Ruta & ""
Set cnbase = New ADODB.Connection
cnbase.ConnectionString = Conexion
cnbase.Open Conexion
Set Rec = New ADODB.Recordset
End Sub
Si deseas hacerlo de otra forma puedes checarlo aqui:
http://www.elguille.info/vb/ejemplos/imagenes_ADODataControl.htm
http://www.mvps.org/vexpert/articles/adoImages.htm