表单字段由2表单下拉列表填充到交叉引用查询 [英] Form field populted by 2 form droplist to cross reference Query

查看:69
本文介绍了表单字段由2表单下拉列表填充到交叉引用查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我正在使用访问2016 DB。我有一个组合框Temp,一个组合框Specific Gr。和文本框转换。我有一个查询TempConversionChart。


所以它看起来大致相同,但整体是91行x 7列。修正更复杂但相似。


F 085 090 095 100 105

300 0.0001 0.0002 0.0003 0.0004 0.0005


302 0.0011 0.0012 0.0013 0.0014 0.0015


继续增加89行。


我想要做的是使用组合框来显示F值。一个组合框,用于显示列085,090,095,100和0。和105。我希望文本框显示2个组合框选项的交集,选择示例302并选择095,在文本框中显示结果0.0013,以便表单的其余部分可以计算更正的值。

Hello,

I''m working on a access 2016 DB. I have a combo box "Temp", a combo box "Specific Gr" and textbox "Conversion". I have a query "TempConversionChart".

So it looks roughly like this but overall is 91 rows x 7 columns. The corrections are more complicated but similar.

F 085 090 095 100 105
300 0.0001 0.0002 0.0003 0.0004 0.0005

302 0.0011 0.0012 0.0013 0.0014 0.0015

goes on for 89 more rows.

What I want to do is use a combo box to show "F" values. A combo box to show the columns "085", "090", "095", "100" and "105". I want the text box to display the intersection of the 2 combo box selections, Example 302 is selected and 095 is selected displaying the result 0.0013 in the text box so the rest of the form can calculate the corrected values.

推荐答案

欢迎来到字节。


你想要达到的目标相对简单,但在继续之前,我想确保更正值不能从比重字段和其他字段计算(这个数字代表什么,它的名称是什么?)。


如果是这种情况,你会觉得好几个小时输入大约500个值。


一般来说,尝试给表中的所有字段名称一个有意义的名称,同样适用于表单上的控件。控件名称,字段名称,表名称或查询名称中也没有空格。如果你这样做,你将不得不在名称周围加上方括号[具体G]


看看 https://en.wikipedia.org/wiki/Leszyn...ing_convention 这是许多程序员使用的惯例。 " CboSGravity"实际上告诉你关于控件的用途,Temp什么也没告诉你。


Phil
Welcome to Bytes.

What you are looking to achieve is comparatively simple, but before proceeding, I want to make absolutely sure that the Correction Values can''t be calculated from Specific Gravity field, and the other field (what does this number represent and what is it''s name?).

If this is the case, you are going to be amused for hours entering about 500 values.

As a general point, try to give all field names in tables a meaningful name and the same applies to controls on forms. Also don''t have spaces in control names, field names, table names or query names. If you do, you will have to put square brackets round the name [Specific G]

Have a look at https://en.wikipedia.org/wiki/Leszyn...ing_convention which is the convention that many programmers use. "CboSGravity" actually tells you somthing about what the control is for, "Temp" tells you nothing.

Phil


嘿Phil,


每个第三个值都略有不同。我花了好几个小时试图找出修正背后的数学但却无法做到。也许这是一个简单的等式,但它逃避了我,我知道没有人知道数学。我的猜测是基于四舍五入的每三个值都不同。


此时从名称中删除空格会很简单。我没有表格,查询或宏名称中的空格,但我想我把球放在控件上。
Hey Phil,

Every 3rd value is slightly different. I spent hours trying to figure out the math behind the corrections but was unable too. Maybe it is a simple equation but it evades me and no one I know knows the math. My guess is every 3rd value is different based on rounding though.

It will be simple at this point to remove spaces from names. I didn''t have spaces in table, query or macro names but I guess I dropped the ball on controls.


但你是正确的,我需要在到达之前纠正。这是我第一次尝试这样的事情,所以我确定它存在缺陷,但我已经找到了一些基本的东西,但我肯定99%我还没有。
But you are correct in that I need to correct before getting to far. This is my first attempt at anything like this so I''m sure its flawed but I have figured out some basic stuff but I''m sure about 99% I have not.


这篇关于表单字段由2表单下拉列表填充到交叉引用查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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