根据所选的组合框或列表框值动态显示图像 [英] Image to disyplay dynamically based on combo or list box value selected

查看:82
本文介绍了根据所选的组合框或列表框值动态显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一组20个图像(.jpg)格式,我想要与我的新访问数据库合并,它将根据我从组合下拉框或列表中选择的值动态显示表单上的图像框。我创建组合下拉框或列表框没有问题,但我需要图像部分的帮助。


我可以在VB 6中创建这个方法,但是没有在MSAccess 2000或2003中尝试过。谢谢。

I have a group of 20 images (.jpg) formats that I want to incorporate with my new access database that will dynamically display the image on the form based on the value that I select from the combo-drop down box or list box. I have no problem creating the combo-drop down box or list box, but I need assistance on the image part.

I can create this method in VB 6, but have not tried in MSAccess 2000 or 2003. Thanks.

推荐答案


我有一组20个图像(.jpg)格式,我想与我的新访问数据库合并,它将根据我选择的值动态显示表单上的图像从组合下拉框或列表框中。我创建组合下拉框或列表框没有问题,但我需要图像部分的帮助。


我可以在VB 6中创建此方法,但尚未在MSAccess 2000或2003中尝试过。谢谢。
I have a group of 20 images (.jpg) formats that I want to incorporate with my new access database that will dynamically display the image on the form based on the value that I select from the combo-drop down box or list box. I have no problem creating the combo-drop down box or list box, but I need assistance on the image part.

I can create this method in VB 6, but have not tried in MSAccess 2000 or 2003. Thanks.



下拉框是否包含图像的完整路径或存储在数据库中的图像?

Does the drop down box hold the full path to the image or is the image stored in the database?


drop down只是一个列表。我需要以某种方式解决如何解决这个问题的起点。我以前从未在MSAccess表单上处理动态图像。
The drop down is just a list. I need somehow a starting point on how to tackle this task. I''ve never worked on a dynamic image on an MSAccess form before.



下拉列表只是一个列表。我需要以某种方式解决如何解决这个问题的起点。我以前从未在MSAccess表单上处理过动态图像。
The drop down is just a list. I need somehow a starting point on how to tackle this task. I''ve never worked on a dynamic image on an MSAccess form before.



好​​的,不管怎样你需要检索图像的完整路径。


然后在表格上放一个图像框。 (image1)


然后在组合框的更新后事件......


Me.image1.picture = Me.cboComboName


这假设您拥有存储在cboComboName中的图像的完整路径。您可以通过在下拉列表的第二列中添加文件的完整路径并将绑定列设置为2来执行此操作。

OK somehow you need to retreive the full path to the image.

Then put an image box on the form. (image1)

Then in the after update event of the combobox ...

Me.image1.picture = Me.cboComboName

This assumes you have the full path to the images stored in the cboComboName. You can do this by adding the full path of the file as the value in a second column on the drop down and set the bound column to 2.


这篇关于根据所选的组合框或列表框值动态显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆