AfterUpdate事件自动填充 [英] AfterUpdate Event for auto fill

查看:145
本文介绍了AfterUpdate事件自动填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个名为tblFunds的表,其中包含以下字段: FundID (PK / Auto), FundNo (文本), FundDescr (文本) , GrantNo (文本)。


在表单中,我有几个来自不同表的字段。其中两个字段来自tblFunds: FundID (名称:cboFund)和 GrantNo (txtGrant)。我有这个FundID更新后事件:

I have a table called tblFunds with these fields: FundID (PK / Auto), FundNo (Text), FundDescr(Text), GrantNo (Text).

In a form I have several fields that came from different tables. Two of the fields came from the tblFunds: FundID (Name: cboFund) and GrantNo (txtGrant). I have this After Update Event for FundID:

私人子cboFund_AfterUpdate()

Me.txtGrant = Me.cboFund.Column(3)

End Sub

但是在输入基金编号并将其留空时,它没有填写拨款号码。我做错了什么?


谢谢。

But it?s not populating the Grant Number upon entering the fund number and leaving it blank. What am I doing wrong?

Thanks.

推荐答案

我猜这是因为组合框列为零索引。应该是.Column(2)?
I would guess that it is because the combo box columns are zero indexed. Should it be .Column(2)?


我有:

绑定列:1

列计数:3
列头:否

列宽:0; 1; 1;
I have:
Bound Column: 1
Column Counts: 3
Column Heads: No
Column Width: 0”;1”;1”;


所以你有.Column(0),.列(1)和.C​​olumn(2)
So you have .Column(0), .Column(1), and .Column(2)


这篇关于AfterUpdate事件自动填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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