我可以将一个字段中的数据用作另一个字段中的变量吗? [英] Can I use the data in one field as a variable in the other?

查看:74
本文介绍了我可以将一个字段中的数据用作另一个字段中的变量吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我对Access有点问题,并且想知道是否有人可以

启发我。


我正在建立一个销售产品数据库,包括图像。 Im

将产品数据从CSV文件导入访问数据库。

我关注的两个主要领域叫''ProductID''和

''ImagePath''。


基本上,我想将''ProductID''的记录条目作为

变量复制到其关联的''ImagPath'字段中。


例如:I产品ID为12345.我想复制值''12345'并使用

它在''ImagePath'字段中形成完整的图像路径,即。

''\ images \(var).jpg''


可以在Access中轻松完成吗?


干杯... .John

解决方案

是的。


如果在表格上表达路径可能表达为:


" \ images \" &安培; me.productIDfieldname& .jpg


一般来说就是这样。现在,如果它是一个真正的数字那么它b / b
取决于jpg文件的名称是如何创建的,而不是它是如何存储的。 (与产品10相关的图片名称是作为

10.jpg还是0000010.jpg创建的?如果它是一个更长的名称,那么参考

可能是:


" \ images \"& format(me.productIDfieldname," 0000000")&" .jpg"
Ron


" \ images \"& [Prodid]&" .jpg"


但是,为什么在需要时可以计算出图像路径?

< jo *********** @ yahoo.co.ukwrote in message

news:11 ********************** @ m79g2000cwm.googlegr oups.com ...





我对Access有点问题,并且想知道是否有人可以

启发我。


我正在建立一个销售产品数据库,包括图像。我将这个产品数据从CSV文件导入访问数据库。

我关注的两个主要领域叫做''ProductID''和

''ImagePath''。


基本上,我想要复制记录条目''ProductID''作为其关联的''ImagPath'字段的

变量。


例如:我的产品ID为12345.我想复制值''12345''并使用

它在''ImagePath'字段中形成完整的图像路径,即。

''\ images \( var).jpg''


可以在Access中轻松完成吗?


干杯...... John


我该怎么做Ron?


谢谢...... John


paii,Ron写道:


" \ imagesi \" &安培; [ProdID]& .jpg


但是为什么在需要时可以计算出图像路径?


< jo **** *******@yahoo.co.ukwrote in message

news:11 ********************** @ m79g2000cwm .googlegr oups.com ...





我对Access有点问题,想知道是否有人可以

开导我。


我正在建立一个销售产品数据库,包括图像。 Im

将产品数据从CSV文件导入访问数据库。

我关注的两个主要领域叫''ProductID''和

''ImagePath''。


基本上,我想将''ProductID''的记录条目作为

变量复制到其关联的''ImagPath'字段中。


例如:I产品ID为12345.我想复制值''12345'并使用

它在''ImagePath'字段中形成完整的图像路径,即。

''\ images \(var).jpg''


可以在Access中轻松完成吗?


干杯... .John


Hi,

I got a bit of problem with Access and was wondering if someone could
enlighten me.

I''m building a database of products of sale, complete with images. Im
importing the product data from a CSV file into an access databse. The
two main fields Im concerned with are called ''ProductID'' and
''ImagePath''.

Basically, I want to copy the record entry for ''ProductID'' as a
variable into its associated ''ImagPath'' field.

eg: I have product ID 12345. I want to copy the value ''12345'' and use
it to form the full image path in the ''ImagePath'' field ie.
''\images\(var).jpg''

Can this be done easily in Access?

Cheers...John

解决方案

Yes.

if expressing the path on a form it might be expressed as:

"\images\" & me.productIDfieldname & ".jpg"

In general that is how it will be. Now if it is a true number then it
depends on how the name of the jpg file was created vs how it is
stored. (Was the name for the picture related to product 10 created as
10.jpg or as 0000010.jpg? If it is a longer name then the reference
will probably be:

"\images\" & format(me.productIDfieldname, "0000000") & ".jpg"
Ron


"\images\" & [ProdID] & ".jpg"

But why store the image path when you can calculate it whenever needed?
<jo***********@yahoo.co.ukwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...

Hi,

I got a bit of problem with Access and was wondering if someone could
enlighten me.

I''m building a database of products of sale, complete with images. Im
importing the product data from a CSV file into an access databse. The
two main fields Im concerned with are called ''ProductID'' and
''ImagePath''.

Basically, I want to copy the record entry for ''ProductID'' as a
variable into its associated ''ImagPath'' field.

eg: I have product ID 12345. I want to copy the value ''12345'' and use
it to form the full image path in the ''ImagePath'' field ie.
''\images\(var).jpg''

Can this be done easily in Access?

Cheers...John



How would I do that Ron?

Thanks....John

paii, Ron wrote:

"\images\" & [ProdID] & ".jpg"

But why store the image path when you can calculate it whenever needed?
<jo***********@yahoo.co.ukwrote in message
news:11**********************@m79g2000cwm.googlegr oups.com...

Hi,

I got a bit of problem with Access and was wondering if someone could
enlighten me.

I''m building a database of products of sale, complete with images. Im
importing the product data from a CSV file into an access databse. The
two main fields Im concerned with are called ''ProductID'' and
''ImagePath''.

Basically, I want to copy the record entry for ''ProductID'' as a
variable into its associated ''ImagPath'' field.

eg: I have product ID 12345. I want to copy the value ''12345'' and use
it to form the full image path in the ''ImagePath'' field ie.
''\images\(var).jpg''

Can this be done easily in Access?

Cheers...John


这篇关于我可以将一个字段中的数据用作另一个字段中的变量吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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