自动填写MS Access 2010中的表单字段 [英] Automatically Filling Form Fields in MS Access 2010

查看:141
本文介绍了自动填写MS Access 2010中的表单字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Exhibit_Testing表,其中包含以下字段:

Hi I have a table Exhibit_Testing with the following fields:

1)参考编号(自动编号) 2)Region_Name 3)分支代码 4)Branch_Name 5)AOM 6)观察 7)状态 8)收到日期 9)Date_Checked

1) ReferenceNo ( Automatic Number) 2) Region_Name 3) Branch_Code 4)Branch_Name 5) AOM 6) Observation 7) Status 8) Date_Recieved 9) Date_Checked

我想创建一个数据输入表单,如果我输入Branch_Code,则会自动填写Region_Name,Branch_Name,AOM.

I want to create a Data Entry Form where if I enter Branch_Code then, Region_Name, Branch_Name, AOM are automatically filled.

请帮助我.谢谢.

更新:Branch_Code应采用组合框格式.

Update : The Branch_Code should be in Combo Box format.

推荐答案

Branch_Code组合框的RowSource属性应该是一个查询,该查询返回您要自动填写的所有字段.

The Branch_Code combobox's RowSource property should be a query that returns all the fields you want to automatically fill in.

从组合中选择一个特定的分支时,使用AfterUpdate事件来填写其他字段,如下所示:

When a particular branch is selected from the combo use the AfterUpdate event to fill in the other fields as follows:

Private Sub cmbBranch_Code_AfterUpdate()
    txtRegion_Name=cmbBranch_Code.Column(1)
    ...
End Sub

这篇关于自动填写MS Access 2010中的表单字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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