如何通过VBA代码清空Access 2003中的Oleobject字段? [英] How to empty the Oleobject field in Access 2003 through VBA code?

查看:143
本文介绍了如何通过VBA代码清空Access 2003中的Oleobject字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,

我有一个表,其中包含 Access2003 中的 OleObject数据类型字段.
因此,我可以将文件/图像存储在该字段中,并将该存储的文件/图像保存到磁盘中.
但是我需要做的是如何在存储后从该Ole对象字段中删除存储的文件/图像,从而通过VBA代码清空Oleobject字段?

预先感谢您的任何想法或帮助...

Greetings,

I have a table containing a field of OleObject datatype in Access2003.
So I can store file/image in that field and I can save that stored file/image to the disk.
But what I need to do is how to remove the stored file/image from that Ole object field after storing it and thus emptying the Oleobject field through a VBA code?

Thanks in advance for any idea or help...

推荐答案

您需要将NULLNothing设置为字段,例如:
You need to set NULL or Nothing to the value of field, like this:
ObjRecordset.Fields("Photo").Value = NULL


这篇关于如何通过VBA代码清空Access 2003中的Oleobject字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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