Automatically Filling Form Fields in MS Access 2010

*爱你&永不变心* 提交于 2019-12-08 12:02:51

问题


Hi I have a table Exhibit_Testing with the following fields:

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

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

Please help me in that. Thanks.

Update : The Branch_Code should be in Combo Box format.


回答1:


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

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


来源:https://stackoverflow.com/questions/19763095/automatically-filling-form-fields-in-ms-access-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!