需要使用预定义的字段集填充表单 [英] need to populate a form with a predecided set of fields

查看:58
本文介绍了需要使用预定义的字段集填充表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助;需要使用预定的文件集填充表单,这些文件也可以单独使用。更具体;我有一个基于表(tblTestValue)的表单(frmTestValues - 一个连续的表单),它存储TestOrderId,Date等和最重要的测试值,测试的名称存储在查找表单中并被选中(tblTestName.TestName) ,输入价值。

现在必须经常进行一组测试..就像脂质谱一样,每当我需要在每次订购脂质谱测试时输入值时,需要独立选择TCholesterol,HDLCholesterol和甘油三酯。

请建议一个命令,我可以使用预先确定的一组测试名称自动填充testValue表单,这样我就不必一次又一次地进行大量选择。我想要做的是在主窗体上放置一个命令按钮,后点击属性应该用TestName填充子窗体(frmTestValues)(存储在另一个表tblTestName-作为查找表) - 但是会有多个测试名称不仅仅是一个!

a screencap显示实际的表格,但是图片中的名称是不同的。

非常感谢提前!!!

解决方案

那么您想要的是从下拉列表中选择要测试的项目,然后生成相关的测试字段以填写和存储在表格中?这就是你追求的吗?所有物品总共测试了多少次? (我想知道的是,是否可以使用二进制标志将测试字段绑定到项目。)


请回答问题!即使是最大的测试组也不会包含超过20个项目(如果这就是你建议的二进制数据类型)我附加了表格和表格的屏幕上限。请看这里(109.3 KB,80 views)


Please Help; need to populate a form with a predecided set of fileds which may be used seperately as well. To be more specific; I have a form (frmTestValues - a continuous form) based on table (tblTestValue) which stores the TestOrderId, Date etc and most important- values of tests , the name of the test is stored in a lookup form and selected (tblTestName.TestName), value is entered against it.
Now a group of test has to be performed frequently .. like lipid profile which entails selecting TCholesterol, HDLCholesterol and Triglycerides independently each time I have to enter values whenever a lipid profile test is ordered.
Please suggest a command where I could autopopulate the testValue form with a pre decided set of test names so that I don''t have to do a lot of selection again and again. What I would like to do is place a command button on the main form and the after click property should populate the subform (frmTestValues) with TestName ( Stored in a different Table tblTestName- which acts as the lookup table)- but there would be multiple test names not just one!
a screencap shows the actual table but is name is different in the pic.
Thanks a lot in advance!!!

解决方案

So what you want is to select an item for test from a dropdown and then generate the associated test fields for filling in and storing in table? Is that what you are after? Roughly how many test in total for all items? (What I am wondering is if a binary flag could be used to bind a test field to an item).


Thnks fr answering! even the largest test group would not contain more than 20 items ( a binary data type would do if thats what you suggest)I am attaching a screen cap of the table and the form. pls see here http://www.dbforums.com/microsoft-ac...ml#post6486489


Hi Rajesh, looking at the screen cap I notice that the first column is headed Non Profile Test. Does this mean that you have the option to build profiles? Profiles are the way to go I feel, for instance basic diabetic test selected in dropdown displays each test required for that profile, asks for job number, result etc then saves data to testscomplete table. A facility to add tests and test id''s to a lookup table obviosly needed but I find this an intrigueing project and would like to throw some stuff your way. Attached is some scratch code I knocked up to illustrate the idea, obviously not knowing details of your requirements the fields hold different data. The example shows options for vehicle checks dependant on type, either bicycle or car, selecting car causes a query to lookup all test that should be performed on the car, giving the option to fill in jobnum and result. This info is then stored in tested table. Tests are held in a seperate table with test name and and id code, these id codes are added in a string format to the profiles (car and bicycle). The needed tests are extracted with a query using the instr (in string )function to id if a test id string is contained within the profile string.
Selecting the profile is made on the main form, the tests to be performed and results entering are in a subform and the saved results table displayed in another subform. This is just a mockup of the idea and not functional in saving any data. Just run the idea past you.

My original idea of using binary flags was that one byte holds 8 bits giving 9 differing values (including zero) so you have 8 flags that can be set or unset by anding (bitwise and) the flag byte with 255, I have used this to allow/ disallow access to various menu items in the past as it''s relatively easy to assign flag values to users as they log on via a lookup aginst the logon id.

Attached Files
testing.zip (109.3 KB, 80 views)


这篇关于需要使用预定义的字段集填充表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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