如何从一个字段基础输入数据 [英] How to Input data from one field base off another

查看:93
本文介绍了如何从一个字段基础输入数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在表格中得到类似下列内容的内容?


在表B中如果[字段2] =" out然后[字段3]将输入表A [字段3]


表A:

字段1 = ID

字段2 =名称

字段3 =输出日期(txt字段带输入掩码)


表B:

字段1 = ID(此字段与A和B之间存在关系)

字段2 =类型(从查询中下拉选项)

字段3 =日期

How do I get somthing like the following idea in my tables?

In Table B "If [field 2]= "out" then [Field 3] will be input in to Table A [field 3]"

Table A:
Field 1 = ID
Field 2 = Name
Field 3 = Out Date (txt field w/ an inputmask)

Table B:
Field 1 = ID (there is a relationship between A and B w this field)
Field 2 = Type (drop down of choices from a Query)
Field 3 = Date

推荐答案

您的意思是


如何从tableb.field3更新tablea.field3

其中tableb.field2 =" out"





如何编写一个选择tableB.field3的查询tablea.field2 =" out"

否则它选择tableb.field2



我想我的排名是

你想要一个

更新查询还是一个选择查询?
Do you mean

How to update tablea.field3 from tableb.field3
where tableb.field2="out"


or

how to write a query that selects tableB.field3 when tablea.field2="out"
otherwise it selects tableb.field2


I guess my quetion is
Are you wanting an
update query or a select query?


如何从tableB.field3更新tableA.field3

其中tableB.field2 =" out"


但这必须自动完成,然而第二部分也是一步一步。 :)
How to update tableA.field3 from tableB.field3
where tableB.field2="out"

but this must be done automatic and there is a second part as well however one step at a time. :)


您应该始终使用select查询启动更新查询,以便确保要更新的内容是您想要更新的内容。不首先做更新是危险的,我已经好几次了。一旦更新,你就不能回去(没有撤消).....除非你有备份
You should always start an update query with a select query so that you can be sure that what will be updated is what you want updated. Doing an update without doing that first is dangerous and I have been cought a couple of times. Once updated you can''t go back (there is no undo) ..... unless you have a backup
展开 | 选择 | 换行 | 行号


这篇关于如何从一个字段基础输入数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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