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
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
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
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28