[Access 2000] Foto aanroepen met path

Pagina: 1
Acties:

  • degoeroe
  • Registratie: Augustus 2001
  • Laatst online: 29-10-2019

degoeroe

Wat hep de goeroe nau gesegt !

Topicstarter
Ik ben een paar duizend foto's in een database aan 't kloppen. De foto's moeten op een form te zien zijn. Uiteraard wil ik de foto's zelf niet in de Dbase hebben.

Er schijnt een manier te zijn om de foto's gewoon met een path aan te roepen en zo te projecteren in een form. De MSNB heeft wel een oplossing maar die heb ik NIET werkend gekregen....HEEELLLUUUUPPPPP :'(

P IV 2,4 (533) ASUS P4B533, 640Mb PC-2100, 80Gb Maxtor 8Mb cache & 60Gb IBM, 2 x 17" IIyama Prolite X436S-S, Plextor PX-708A, Plextor 52/24/52A, Logitech Marble Mouse USB, GeForce 3 Ti200


  • whoami
  • Registratie: December 2000
  • Laatst online: 21:11
Toon die oplossing eens die je niet werkend hebt gekregen.

https://fgheysels.github.io/


  • degoeroe
  • Registratie: Augustus 2001
  • Laatst online: 29-10-2019

degoeroe

Wat hep de goeroe nau gesegt !

Topicstarter
Komptie:

*************************
1. Create the following table:

Table: tblImage
----------------------------
Field Name: ImageID
Data Type: AutoNumber
Indexed: Yes (No Duplicates)

Field Name: txtImageName
Data Type: Text

Table Properties: tblImage
--------------------------
PrimaryKey: ImageID

2.Open the tblImage table in Datasheet view and add the path and name of a bitmap file to each record. The following examples show how the records might look:


C:\Windows\Circles.bmp
C:\Windows\Waves.bmp
C:\Windows\Tiles.bmp
C:\Windows\Bubbles.bmp

3.Create the following new form based on the ImageTable table:

Form: frmImage
----------------------
Caption: Image Form
RecordSource: tblImage

Image Control
---------------------------------
Name: ImageFrame

Note that the Picture property of the Image control has been set to the path name for the first image; the Image control must have a valid Picture property in Design view. Also, if you do not want the path to appear in the form, you can set the Visible property of the txtImageName control to False .


4.On the View menu, click Code , and then paste or type the following code:


Function setImagePath()
Dim strImagePath As String
On Error Resume Next
strImagePath = Me.txtImageName
Me.ImageFrame.Picture = strImagePath
End Function


5.Set the OnCurrent and AfterUpdate events to =setImagePath() .


Open the Imageform form in Form view. Note that the form displays the corresponding bitmap for each record
Picture: "C:\Windows\Circles.bmp"

Text box
----------------------
Name: txtImageID
ControlSource: ImageID

Text box
---------------------------
Name: txtImageName
ControlSource: txtImageName


******************************************
Dat is 'm. Ik loop dus vast in het caption verhaal (stap 3). Daar staat

Caption: ImageForm

Ik weet niet hoe of wat ik dit realiseer.

P IV 2,4 (533) ASUS P4B533, 640Mb PC-2100, 80Gb Maxtor 8Mb cache & 60Gb IBM, 2 x 17" IIyama Prolite X436S-S, Plextor PX-708A, Plextor 52/24/52A, Logitech Marble Mouse USB, GeForce 3 Ti200


  • Skinny
  • Registratie: Januari 2000
  • Laatst online: 25-07 18:17

Skinny

DIRECT!

Caption is een van de eigenschappen ("Properties") van een object (in dit geval het "Form").

Klik met rechts op het formulier en klik op "Eigenschappen"/"Properties" (NL/EN)

Er verschijnt een venstertje waarin dit soort eigenschappen terug te vinden zijn (En ook te wijzigen).

SIZE does matter.
"You're go at throttle up!"


  • degoeroe
  • Registratie: Augustus 2001
  • Laatst online: 29-10-2019

degoeroe

Wat hep de goeroe nau gesegt !

Topicstarter
Klopt, die properties en zo die zie ik wel. Maar verder kan ik het niet uitvoeren. D'r is dus blijkbaar niet een 'simpele' manier om foto's aan te roepen van buiten een Dbase?

P IV 2,4 (533) ASUS P4B533, 640Mb PC-2100, 80Gb Maxtor 8Mb cache & 60Gb IBM, 2 x 17" IIyama Prolite X436S-S, Plextor PX-708A, Plextor 52/24/52A, Logitech Marble Mouse USB, GeForce 3 Ti200