设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
楼主: sunny-xie
打印 上一主题 下一主题

[Access本身] [已解决]如何让图片随着点选的组合框同步显示?

[复制链接]
11#
发表于 2008-1-11 13:04:51 | 只看该作者
好东西,顶一下。郁闷ing,没有积分想看一下效果也不行
12#
 楼主| 发表于 2008-1-11 17:42:43 | 只看该作者
感谢sgrshh29 和 tmtony 下面的代码弄明白了,不同编号的图片已可以对应显示。
关于tmtony说的图片不存在时那个问题,如何用代码判断?如果图片和库不是放在同一个路径,(比如把库拆分为前后台,难道要把前台和图片一起发给用户?)
如何修改路径?
    p0 = CurrentProject.Path & "\" & Me.zuhe1 & ".bmp"
    p1 = CurrentProject.Path & "\" & Me.zuhe1 & "-1.bmp"
    p2 = CurrentProject.Path & "\" & Me.zuhe1 & "-2.bmp"
    p3 = CurrentProject.Path & "\" & Me.zuhe1 & "-3.bmp"
    p4 = CurrentProject.Path & "\" & Me.zuhe1 & "-4.bmp"
    Me.Image218.Picture = p0
    Me.Image219.Picture = p1
    Me.Image220.Picture = p2
    Me.Image221.Picture = p3
    Me.Image222.Picture = p4

[ 本帖最后由 sunny-xie 于 2008-1-11 17:48 编辑 ]
13#
 楼主| 发表于 2008-1-12 09:32:40 | 只看该作者

回复 14# 的帖子

用了这个模块后,
zuhe1那里如何写?现zuhe1的代码如下:
Private Sub zuhe1_AfterUpdate()
    Me.[zuhe2] = Me.zuhe1.Column(1)
    Me.Text17 = Me.zuhe1.Column(2)
    Me.Text19 = Me.zuhe1.Column(3)
    Me.Text21 = Me.zuhe1.Column(4)
    Me.Text23 = Me.zuhe1.Column(5)
    Me.Text33 = Me.zuhe1.Column(6)
    Me.Text35 = Me.zuhe1.Column(7)
    Me.Text37 = Me.zuhe1.Column(8)
    Me.Text39 = Me.zuhe1.Column(9)
    Me.Text57 = Me.zuhe1.Column(10)
    Me.Text71 = Me.zuhe1.Column(11)
    Me.Text73 = Me.zuhe1.Column(12)
    Me.Text75 = Me.zuhe1.Column(13)
    Me.Text79 = Me.zuhe1.Column(14)
    Me.Text81 = Me.zuhe1.Column(15)
    Me.Text83 = Me.zuhe1.Column(16)
    Me.Text99 = Me.zuhe1.Column(17)
    Me.Text101 = Me.zuhe1.Column(18)
    Me.Text104 = Me.zuhe1.Column(19)
    Me.Text106 = Me.zuhe1.Column(20)
    Me.Text108 = Me.zuhe1.Column(21)
    Me.Text110 = Me.zuhe1.Column(22)
    Me.Text112 = Me.zuhe1.Column(23)
    Me.Text122 = Me.zuhe1.Column(24)
    Me.Text124 = Me.zuhe1.Column(25)
    Me.Text126 = Me.zuhe1.Column(26)
    Me.zuhe3 = Me.zuhe1.Column(27)
    Me.Text144 = Me.zuhe1.Column(28)
    Me.Text147 = Me.zuhe1.Column(29)
    Me.Text149 = Me.zuhe1.Column(30)
    Me.Text151 = Me.zuhe1.Column(31)
    Me.Text161 = Me.zuhe1.Column(33)
    Me.Text163 = Me.zuhe1.Column(34)
    p0 = CurrentProject.Path & "\" & Me.zuhe1 & ".bmp"
    p1 = CurrentProject.Path & "\" & Me.zuhe1 & "-1.bmp"
    p2 = CurrentProject.Path & "\" & Me.zuhe1 & "-2.bmp"
    p3 = CurrentProject.Path & "\" & Me.zuhe1 & "-3.bmp"
    p4 = CurrentProject.Path & "\" & Me.zuhe1 & "-4.bmp"
    Me.Image218.Picture = p0
    Me.Image219.Picture = p1
    Me.Image220.Picture = p2
    Me.Image221.Picture = p3
    Me.Image222.Picture = p4
  
End Sub
14#
 楼主| 发表于 2008-1-12 09:44:57 | 只看该作者

库,图片在下一楼,

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
15#
 楼主| 发表于 2008-1-12 09:45:19 | 只看该作者

接上一楼的图片

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x

点击这里给我发消息

16#
发表于 2008-1-12 09:56:17 | 只看该作者
17#
 楼主| 发表于 2008-1-12 10:10:09 | 只看该作者

站长,没权限进这个页面

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
18#
 楼主| 发表于 2008-1-12 12:05:46 | 只看该作者

回复 20# 的帖子

有进度条。。
记得斑竹有一帖里说到用me.EmpPhoto.Picture = LoadPicture("路径")这个方法可把进度条去掉,不知如何改?
19#
 楼主| 发表于 2008-1-12 14:04:44 | 只看该作者

回复 22# 的帖子

没了进度条舒服多了,代码现还不熟悉也在学习,
p0= LoadPicture("TempPath") & "\" & Me.zuhe1.Column(0) & "-1.bmp"
我试着这样去改,没成功过。。。乱撞
这个问题解决了,THKS!
20#
发表于 2009-7-17 12:01:13 | 只看该作者
正好要用到这个功能,近来学习一下。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-9-24 10:20 , Processed in 0.095591 second(s), 32 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表