Results 1 to 4 of 4

Thread: Images proble

  1. #1
    Join Date
    Apr 2006

    Unanswered: Images proble

    I am making a software for an obstetrics doctor, he takes his sonar pictures using a tv card then he links them through ole bound onto a form where it is displayed and printed , obviously it increased the size of the database tremendously
    is there any other way i can view the picture in thr form without the big size problem

  2. #2
    Join Date
    Jan 2004
    Yes, you can. You can make a link to the file in your table. The link will show the picture.
    So within your table you'll have a column (for instance picpath) with the path to the picture.
    The northwind database has a demo with linking to pictures.

  3. #3
    Join Date
    Apr 2006

    cant find it

    I had a look at the northwind
    it is a normal ole bound picture , not a linked path?

  4. #4
    Join Date
    Jan 2004
    Ok it isn't hard to do

    -Make a table with a column which stores the path
    -Make a query containing the picture table
    -Place the query as recordsource in your report
    -Within the detail section place a picture and name the element 'imageframe', within the tab layout of the picture you will hardcode picture to an existing picture on your disk
    for instance c:\windows\zapotec.bmp
    - place the field specifying your picturepath in the report and call it filename

    If you open the report now you will see zapotec for every detail record .

    Within the detail section we'll use an event procedure to swift the picture for each detail record depending on the path specified in your table

    - click the detail section
    - right click properties
    - within 'on layout' you will place the following event:
    Private Sub Details_Format(Cancel As Integer, FormatCount As Integer)

    On Error GoTo Proc_Err
    Me.ImageFrame.Visible = True

    If Me.FILENAME = Null Then
    GoTo Einde_Procedure
    End If

    Me![ImageFrame].Picture = Me![FILENAME]
    ''Me.txtImageNote = DisplayImage(Me.ImageFrame, Me.FILENAAM)

    Exit Sub

    Select Case Err.Number
    Case 2220 ' Can't find the picture.
    Me.ImageFrame.Visible = False
    strResult = "Can't find image in the specified name."
    Resume PROC_EXIT
    End Select

    MsgBox Err.Description
    Resume PROC_EXIT


    End Sub

    That's it, the report will show each picture specified

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts