从其他表设置CheckBox值 [英] Set CheckBox Values From Other Tables

查看:66
本文介绍了从其他表设置CheckBox值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

女士们,先生们,下午好,我有一个问题。


我正在为医院写一个数据库,现在我正在处理其中一个表格。在这个表单(此后称为主表单)上,有几个按钮,通向其他表单(此后称为子表单),客户端希望在该按钮旁边有一个复选框,当表单已被检查时填写(如果日期具有除Null之外的任何值,则表格计为填写)。


问题是每次访问都需要填写几种表格,例如,每次都是相同的问卷。我遇到的问题是添加一个复选框,只检查是否填写了正确的表格。它需要检测正确的患者编号,然后是正确的表格类型,然后是表格的正确序列号。我完全陷入困境,这就是我在这里寻求帮助的原因。

非常感谢,我已经尝试了很多东西,但似乎没有工作,如果你需要或想要解决这个问题的任何其他信息,我很乐意提供它。


亲切的问候,


David。

Good afternoon ladies and gentlemen, I had a question.

I am writing a database for an hospital, and right now I am working on one of the forms. On this form (called main form after this), there are several buttons, leading to other forms (called subforms after this), and the client wants to have a check box next to the button, which is checked off when the form has been filled in (a form counts as filled in if the date has any value other than Null).

The problem is that there are several forms that need to be filled in with every visit, for instance, a questionnaire which is the same every time. The problem I am having is adding a check box, which only checks off if the right form is filled in. It needs to detect the right patient number, then the right type of form, and then the right serial number of the form. I am completely stuck, and that''s why I''m asking for help here.

Many thanks in advance, I''ve tried a bunch of things already but none seem to work, and if there is any additional information you need or want to solve this question, I''d be happy to supply it.

Kind regards,

David.

推荐答案

这并不能让你的情况非常清楚大卫。我怀疑你可能会从你正在使用的数据结构的角度出发,更好地解释这种情况。这将使我们更清楚地了解您的表单所要做的事情,而不仅仅是尝试描述表单的行为。


可能需要重新启动并且最好方法是在主窗体的选项卡页面上设置子窗体(不是您描述的子窗体 - 不是)。这在很大程度上取决于确切的要求,我们几乎没有看到它。
That doesn''t really make your situation very clear David. I suspect you may do better explaining the situation first off from the standpoint of the data structure you''re working within. That will give us a clearer understanding of what your form is looking to do than just trying to describe the form''s behaviour.

It may be that a restart is required and your best approach will be to have subforms (not what you describe as subforms - which aren''t) on tabbed pages of your main form. This depends largely on the exact requirement though, and we have barely a glimpse of that as yet.


当然,我会试着更清楚。


数据库是关于患者的。所有其他信息都与患者ID相关联。我现在有一个表格,我称之为主表格。它是您启动数据库时获得的表单。在所述表格的前几行中,它显示一般患者数据,Patient_ID,名字,姓氏,Date_Of_Birth和Sex。下面是一个字段,有几个按钮。按钮会导致其他形式(实际上不是您所说的子形式),它提供了有关患者的其他信息,例如,有一个按钮表示MRI,如果您单击该按钮,则可以填写有关患者的数据MRI。


现在,该数据库的主要用途是针对特定患者进行的一项研究。本研究中包括的所有患者必须在一段时间内(每半年一次,大约三年)多次复发。每次他们回来检查时,都会进行几次测试,并填写一些问卷。每次检查,完成相同的测试,并填写相同的问卷。所以,在主要表格中,你有一个按钮网格。纵轴是不同类型的测试和问卷,横轴是时间。


你现在最终得到的是6个按钮,都说问卷1。这是因为问卷调查1必须在每次登记时填写。我通过点击按钮来处理这个问题,将值分配给名为Serial_Nr的隐藏字段。因此,单击18个月列中的按钮会将值3指定为Serial_Nr。


现在,请注意,这一切都有效。这一切都很有效。问题是,我的客户要求一个额外的功能,即如果其中一个表格已填写,它将显示在按钮后面。因此,如果在问卷1的按钮后面有一个复选框,在18个月时,它被填写,它显示为已检查。


这是一种问题,我不确定如何继续。我走进的问题是,我似乎无法使复选框依赖于序列号。如果我按照我认为应该采用的方式进行,我会得到全部,或者没有选中任何复选框。


我尝试过查询,如果序列号是所需的值,它会显示日期,而且患者ID也是正确的,但问题是如果其中一个表格没有填写(通常是这种情况),它没有显示任何记录。


我希望这有帮助,如果你帮助了我,我将不胜感激。如果我再说错了,我很抱歉,如果我拍了一些我要解释的照片会有帮助吗?


事先感谢,


David
Certainly, I will try to be more clear.

The database is about patients. All the other information is connected to the patient ID. I now have a form, which I call the main form. It is the form you get when you start up the database. On the first few lines of said form, it shows the general patient data, Patient_ID, Firstname, Lastname, Date_Of_Birth and Sex. Underneath that is a field, with several buttons. The buttons lead to other forms (indeed not subforms, as you said), which give additional information about the patient, for instance there is a button which says MRI, and if you click that button, you get to fill in data about the patients MRI.

Now, the main use of this database is for a study, done on specific patients. All patients that are included in this study, have to come back several times over a period of time (once every half year, for about three years). Every time they come back for a check up, several tests are done and a few questionnaires are filled in. Every check up, the same tests are done, and the same questionnaires are filled in. So, in the main form, you have a grid of buttons. On the vertical axis are the different types of tests and questionnaires, and on the horizontal axis is time.

What you now end up with, is 6 buttons, all saying ''Questionnaire 1''. This is because Questionnaire 1 has to be filled in every time the person checks in. I dealt with this by making clicking of the button assign a value to a hidden field called "Serial_Nr". So, clicking the button which is in the column ''18 months'' assigns a 3 to the value "Serial_Nr".

Now, mind you, this all works. This all works very well actually. The problem is, that my client has asked for an additional feature, namely, that if one of the forms has been filled in, that it will show behind the button. So, if there''s a check box behind the button for Questionnaire 1, at 18 months, and it is filled in, that it shows up as checked.

This is kind of a problem, and I am unsure how to proceed. The problem I walk into is that I don''t seem to be able to make the checkbox be dependent on the serial number. If I do it the way I think it was supposed to be, I get that either all, or none of the checkboxes are checked.

I have tried working with queries, where it shows the date if the serial number is the desired value, and the patient ID is also correct, but the problem there is that if one of the forms is not filled in (which is going to be often the case), it shows no records.

I hope this helped, and I would appreciate it if you helped me. I''m sorry if I said it wrong again, would it help if I made some pictures of what I am trying to explain?

Thanks on beforehand,

David


大卫,我没想到你第一次做了一次不好的尝试。只是描述这样的事情比人们意识到的要困难得多。关于首先发布表设计的暗示应该有所帮助,但我不确定你是否注意到它。因为现在是周末,而且他们通常都很慢,为什么不给我附上副本来代替。这样我就不需要依赖你的解释技巧了(相信我,当我说知道找到跟他们的成员是多么罕见)如此之多,我可以找到我需要的任何信息。


这将依赖于您按照非常精确地附加数据库(或其他工作)


请记住,这更多的是关于你的情况有多复杂,而不是任何无法解释的事情。很少有人能在最好的时候做到这一点,这不是最直接的解释。
David, I wasn''t thinking you''d made a bad stab at it first time. It''s just that describing something like this is a lot harder than people realise. My hint about posting the table design first was supposed to help, but I''m not sure you noticed it. As it''s weekend though, and they''re generally quite slow times, why don''t you attach a copy for me to look at instead. That way I don''t need to rely on your explanation skills (Trust me when I say I know how rare it is to find members with them) so heavily and I can find any information I need.

That will rely on you following the instructions found in Attach Database (or other work) very precisely though.

Remember, this is more about how complex your situation is than about any inability to explain things. Very few can do that at the best of times and this is not the most straightforward of situations to explain.


这篇关于从其他表设置CheckBox值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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