从组合框向字段添加数据 [英] Adding data to a field from combo box

查看:78
本文介绍了从组合框向字段添加数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个用于输入救护车运行表的数据库。我有一张表列出了不同的历史条件(HTN,CHF,哮喘......)。在我的主报表中,我有一个组合框,从该表中获取其列表。


我希望能够从列表中进行选择,然后点击旁边的命令按钮,将当前数据添加到另一个字段,标记为历史记录。然后我希望能够从同一个组合框中进行另一个选择并添加到同一个历史字段而不删除那里的内容。如果可以在选择之间添加逗号,那也是有益的。我可以使用空格,可以添加到原始表格中。


因此,最终的字段值最终会在一个字段中显示多个历史数据,看起来像这样 - -----哮喘,瑞士法郎,HTN,

我已经想出了如何使用Me.xxx1 = Me.xxx2脚本将数据从一个字段复制到另一个字段,但是这会覆盖什么在那里。我想保留当前数据并添加到列表中。


我确定这是可能的,但无法找到有关如何完成此操作的信息。我感谢任何帮助。


谢谢!!

Mike Busby

解决方案

< blockquote>这应该这样做:

展开 | 选择 | Wrap | 行号


然而,这不是一个好的设计。您应该有另一个与此表相关的表,该表在单独的记录中列出每个人的疾病。


这实际上取决于您使用它的目的,Rabbit。如果您想要操纵数据,即计算有多少患有哮喘的患者,有多少患有COPD等等,那么是的,你会比你说的更好。如果唯一的一点是生成单个救护车运行的报告,那么备忘录字段框就可以了,你建议的是矫枉过正。


Linq ; 0)>

I am creating a database for inputing ambulance run sheets. I have a table that lists different history conditions (HTN, CHF, Asthma....) In my main report form, I have a combo box that gets its'' list from that table.

I want to be able to select from the list and then hit a command button next to it that adds the current data to another field, labeled history. I then want to be able to make another selection from the same combo box and add to that same history field without erasing what was there. If it''s possible to add a comma between the selections, that would be beneficial too. I could live with spaces, which could be added in the original table.

So, the final field value would end up having multiple history data in one field, looking something like this------- Asthma, CHF, HTN,

I have figured out how to copy data from one field to another with the Me.xxx1 = Me.xxx2 script, but that overwrites what was there. I want to keep the current data and add to the list.

I''m sure this is possible, but have not been able to find info on how to accomplish this. I appreciate any help that can be given.

Thank you!!
Mike Busby

解决方案

This should do it:

Expand|Select|Wrap|Line Numbers


That''s not a good design for it however. You should have a another table that is related to this table that lists the illnesses for each person in a separate records.


It really depends on what you''re using it for, Rabbit. If you''re going to want to manipulate the data, i.e. calculate how many patients with Asthma are transported, how many with COPD, etc. then yes, you''d be better off doing as you say. If the only point is generating a report of a single ambulance run, then a memo field box is just fine and what you suggest is overkill.

Linq ;0)>


这篇关于从组合框向字段添加数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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