且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从组合框向字段添加数据

更新时间:2023-12-01 09:31:16

这应该这样做:

展开 | 选择 | 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)>