+ -
当前位置:首页 → 问答吧 → ACCESS窗体照片显示

ACCESS窗体照片显示

时间:2009-03-04

来源:互联网

我用ACCESS做了个人员管理系统,想在窗体上显示照片,将照片放在了一个文件夹里,表的照片字段用文本显示了照片的路径,下来该怎么做?我是菜鸟,请详细指点一下,谢谢!

作者: lvlinle   发布时间: 2009-03-04

我在网上找了段程序,可是出现了下面的问题,不知道这个 FileExistCheck 函数应该在哪儿定义?如何定义?

附件

123.JPG(20.26 KB)

2009-3-4 16:18

作者: lvlinle   发布时间: 2009-03-04

刚才的问题解决了,可是又出现了下面的问题,我将表中存照片的文本字段命名为“照片地址”,可是运行时显示" .照片地址 " 方法和数据成员未找到,不知道问题出在哪里了?代码如下:

Private Sub Form_Current()
    Dim TempPhotoPath As String

    TempPhotoPath = CurrentProject.Path & "\照片\" & Me.照片地址 & ".jpg"

    If FileExistCheck(TempPhotoPath) = 1 Then
   
       Me.Image181.Picture = LoadPicture(TempPhotoPath)
      
       Else
   
  End If

作者: lvlinle   发布时间: 2009-03-04

Option Compare Database
Option Explicit

Private Sub Command5_Click()


    Dim TempPhotoPath As String
    TempPhotoPath = dlgGetFile(, , , , , "查找图片")
    If TempPhotoPath = "" Then Exit Sub
   
    If FileExistCheck(TempPhotoPath) = 1 Then
   
       Me.照片.Picture = TempPhotoPath
       Else
       Me.照片.Picture = ""
      
    End If
   
End Sub

Private Sub Form_Current()
    Dim TempPhotoPath As String


    TempPhotoPath = CurrentProject.Path & "\" & Me.图片地址 & ".jpg"

    If FileExistCheck(TempPhotoPath) = 1 Then
   
       Me.照片.Picture = TempPhotoPath
       Else
       Me.照片.Picture = ""
      
    End If

End Sub

作者: wd815   发布时间: 2009-09-17

占位!正在搜索这方面资料,回头再来拜读。

作者: qangsheng   发布时间: 2011-05-12