最后一个问题...... [英] Last question for awhile...

查看:53
本文介绍了最后一个问题......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,这有希望成为我最后一个问题,因为在过去的几周里,我已经有了一大堆b $ b。感谢大家的耐心等待

me :)


最后一个主要障碍是尝试以一种看起来好的形式设置组合框

up另一个表中的值。


这个想法是,当用户选择一个文本答案时,它将是

输入到表中作为一个数字。

示例如下:

我有2个字段的xtbl.MarrCoding:MarrCode和MarrText

0单个

1已婚

2离婚




存在野外婚姻状况的表格。我希望他们能够在下拉框中选择单身,已婚或离婚,并且

在查看表格时会显示这些文字版本。但是我想要表格本身包含编码值(即0,1或2)。


我以前见过它甚至有一个例子,但不能为我的生活弄清楚它的工作原理。我假设它有事情要做

有Row Source类型和Row Source属性但我似乎无法获得

它的工作原理。我已经完全复制了工作版本对于

这些属性无效。


如果有人有关于如何做到这一点的指示是

太棒了。谢谢!


Jason

Okay this will hopefully be my last question for awhile since I''ve had
a bunch over the last few weeks. Thank you all for being patient with
me:)

Last major obstacle is trying to set up combo boxes in a form that look
up values in another table.

The idea is that while the user will select a text answer, it will be
entered into the table itself as a number.
Example would be:
I have xtbl.MarrCoding with 2 fields: MarrCode and MarrText
0 Single
1 Married
2 Divorced
etc.

A form exists where there is a field Marital Status. I want them to be
able to select from Single, married or divorced in a drop down box and
have these text versions show up when looking at the form. However I
want the table itself to contain the coded values (i.e. 0, 1 or 2).

I''ve seen it done before and even have an example, but cannot for the
life of me figure out how its working. I assume it has something to do
with Row Source type and Row Source properties but I cannot seem to get
it working. I''ve replicated exactly what the working version has for
these properties to no avail.

If anyone has some instructions on how to do this that would be
fantastic. Thank you!

Jason

推荐答案

如果你想试试自己要做到这一点,确保你有向导

启用,从工具箱中选择向导,然后选择一个组合框,并将其放在表格,任何形式,甚至是表格​​上的

告诉向导您要自己输入值。你需要2

列。


想先尝试一下吗?
If you want to try to show yourself how to do it, make sure you have wizards
enabled, select wizard from the toolbox, then select a combobox, and drop it
on a form, any form, even a new blank form.

Tell the wizard that you want to type in the values yourself. You''ll need 2
columns.

Want to try that first?


好吧它不是一个优雅的解决方案,但我尝试了你的建议和我

我认为我找到了一个。


如果我制作一个2列组合框并设置它像往常一样,我可以将
将第一列的列宽更改为0,因此最终用户看不到它们只能看到文本,而不是编码

价值。


那是你得到的还是有更好的方法?


谢谢!

Jason

Rick Wannall写道:
Well its not an elegant solution but I tried what you suggested and I
think I found one.

If I make a 2 column combo box and set it up like normal, I can then
change the column width of the first column to 0, so it becomes
invisible to the end users and they only see the text, not the coded
value.

Was that what you were getting at or is there a better way?

Thanks!
Jason
Rick Wannall wrote:
如果你想试着告诉自己该怎么做,请确保你有巫师启用,从工具箱中选择向导,然后选择一个组合框,并将其放在表单,任何表单,甚至是新的空白表单上。

告诉向导您想要自己键入值。你需要2列

想先试试吗?
If you want to try to show yourself how to do it, make sure you have wizards
enabled, select wizard from the toolbox, then select a combobox, and drop it
on a form, any form, even a new blank form.

Tell the wizard that you want to type in the values yourself. You''ll need 2
columns.

Want to try that first?






你得到它了。唯一真正可行的选择是有一个小表

存储这些值,然后使用不同的行源类型

表/查询。同样的事情,或多或少。


很想知道为什么在你的估计中它不是一个优雅的解决方案。


你想要的显示一个值,存储另一个值,你不想显示你要存储的

。根据定义,您将描述两个值在

列表中列出,一列不可见。与一个列宽设置为0的组合框或列表框相比,你能获得多少更接近

的描述?
You got it. The only really viable alternative is to have a little table
that stores those values and then use a different row source type of
Table/Query. Same thing, more or less.

Curious to know why in your estimate it is "not an elegant solution".

You want to show one value, store another, and you don''t want to show the
one you''re storing. By definition you''re describing two values presented in
a list, one column invisible. How much closer could you get to that
description than a combobox or listbox with one column width set to 0?


这篇关于最后一个问题......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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