如何在访问数据库中显示图片以及如何以另一种形式有条件地显示图片 [英] How to show picture in an access database and how can be showed conditionally in another form

查看:114
本文介绍了如何在访问数据库中显示图片以及如何以另一种形式有条件地显示图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两张桌子


1。 tblImage


2。 tblCustomer


在Tblimage表中我有  Maleicon和Femaleicon。当我们列出客户表格时,如果性别是男性,那么我们必须显示男性图标,否则女性图标。我不能硬编码 路径,但它应保存在数据库中。


如何在表单的附件控件中显示图标取决于客户性别。请帮助





polachan

解决方案

您好,


如果您想使用附件字段,那么您可以将图像表与表格的customers表一起加入。


由于您只显示了两个图像,因此将图像存储在图像库中然后使用表格的当前事件中的代码可以更简单地使用图像控件显示正确的图像。 / p>

只需2美分......


I have two table

1. tblImage

2. tblCustomer

In Tblimage table I have  Maleicon and Femaleicon. When we list ccustomer form , if the gender is Male then we have to display male icon otherwise female Icon. I cannot hard code  the path but it should be kept in a database.

How can display the icon in attachment control of a form depends the customer gender. Please help


polachan

解决方案

Hi,

If you want to use an Attachment field, then you can join the image table with the customers table for your form.

Since you only have two images to show, it might be simpler to store the in the Image Gallery and then use code in the form's Current event to display the proper image using an Image control.

Just my 2 cents...


这篇关于如何在访问数据库中显示图片以及如何以另一种形式有条件地显示图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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