自动填写表格 [英] autofill form

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

问题描述

我基本上有一个地址数据库,包括姓名,城市,省和国家。表格还包括这些字段,名称,城市,省份和国家/地区。一切都被送入一张桌子。我想知道是否有办法进行自动填充,这样如果用户以多伦多的身份进入城市,该省将自动显示为安大略省。我很确定这个问题的答案已经以不同的方式发布,但我无法找到它。请帮帮我谢谢!

解决方案


i基本上有一个地址数据库,包括名称,城市,省和国家。表格还包括这些字段,名称,城市,省份和国家/地区。一切都被送入一张桌子。我想知道是否有办法进行自动填充,这样如果用户以多伦多的身份进入城市,该省将自动显示为安大略省。我很确定这个问题的答案已经以不同的方式发布,但我无法找到它。请帮帮我谢谢!



您好。


以下代码将执行此操作。当然,表单控件,表字段和表本身的名称可能在您的数据库中有所不同。

展开 | 选择 | Wrap | 行号


我不想通过表单查找,我只是想把它作为一个if语句,即使我知道它更容易查看...例如我在考虑沿着

如果txtcity = toronto然后txtprovince = ontario


是否可以这样做?



i不想厕所通过表格,我只是想把它作为一个if语句,即使我知道它更容易查看...例如我在考虑沿着这条线路


如果txtcity = toronto那么txtprovince = ontario


可以这样做吗?



你想在代码中添加多少if ... then语句?

你想添加新的if ... 。每次添加新城市时都会发出声明吗?

表查找有什么问题? :)我只能猜测你必须避免使用Access权益的特殊原因。 :))


i basically have an address database, consisting of name, city, province, and country. The form has these fields as well, name, city, province, and country. Everything is fed into one table. I want to know if there is a way to autofill, so that if the user were to enter the city as toronto, the province would automatically appear as ontario. im pretty sure the answer to this question has already been posted in a different way, but i just cant find it. please help me out thanks!

解决方案

i basically have an address database, consisting of name, city, province, and country. The form has these fields as well, name, city, province, and country. Everything is fed into one table. I want to know if there is a way to autofill, so that if the user were to enter the city as toronto, the province would automatically appear as ontario. im pretty sure the answer to this question has already been posted in a different way, but i just cant find it. please help me out thanks!

Hi.

The following code will do it. Certainly the names of form controls, table fields and table itself may be different in your db.

Expand|Select|Wrap|Line Numbers


i dont want to look up through the form, i just sort of want it as an if statement even though i know its easier to do a look up... for example i was thinking of the lines along

if txtcity = toronto then txtprovince = ontario

is it possible to do it like that?


i dont want to look up through the form, i just sort of want it as an if statement even though i know its easier to do a look up... for example i was thinking of the lines along

if txtcity = toronto then txtprovince = ontario

is it possible to do it like that?


How many if...then statements do you want to add to your code ?
Would you like to add new if...then statement each time new city is added?
What is wrong with table lookup? :) I can only guess what a special reason you have to avoid using of Access benefits. :))


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

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