如何使用VBA功能更新字段? [英] How to Update Field with VBA Function?

查看:107
本文介绍了如何使用VBA功能更新字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!我正在使用Access 2013,我创建了一个VBA来收集登录用户的用户名。然后我将函数(= GetUsername())配置为该字段的默认值。只要我创建一个新的数据库记录,这就完美地运行了。问题
是我需要更新现有记录上的字段,无论我尝试过什么,我都无法更新记录。有什么想法吗?

Hi! I'm using Access 2013 and I created a VBA to collect the username of the user logged in. I then configured the function (=GetUsername()) as the Default Value for the field. This works perfectly, as long as I'm creating a new database record. The problem is I need to update the field on existing records as well and no matter what I've tried I cannot get it to update the record. Any ideas?

谢谢,

克里斯托弗

推荐答案

到目前为止您尝试了什么?

您是否尝试过使用更新查询? 你可以发布SQL语句吗?

What have you tried thus far?
Have you tried using an Update query?  Can you post the SQL Statement?


这篇关于如何使用VBA功能更新字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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