使用表单选择表中​​的字段 [英] Selecting field in a table using a form

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

问题描述

我有一个包含许多字段的表。我想使用表单选择其中一个字段,以便我可以对该特定字段的条目进行排序。不确定如何在运行时选择字段。任何帮助表示赞赏。

I have a table with a number of fields. I''d like to select one of those fields using a form so I can sort the entries of that specific field. Not sure how to select fields at run time. Any help appreciated.

推荐答案

我不是很了解你,但如果是正确的,请尝试创建一个数据表表单,在设计视图中将其绑定到表中,创建一个文本框并将其记录源设置为表的字段。


您还可以根据表创建查询,从表中选择所需的字段。现在按ASC或DESC对字段进行排序。根据您创建的查询创建数据表单。在设计视图中,创建一个文本框并将其记录源设置为查询字段。
I do not really understand you properly but if am correct, try create a data sheet form, bound it to your table, in design view, create a text box and set its record source to the field of the table.

You can also create a query based on the table, select the desired field from the table. Now sort the field by ASC or DESC. Create a data-sheet form based on the query you created.In design view, create a text box and set its record source to the field of the query.


猜猜我应该更多具体。抱歉。我有一组人员记录,每个记录都有日期/年份字段。

我有十几个字段,名为2001,2002,2003,....在每个字段中我都有一个Y或N.我有一个表单用于填写那些年份字段和其他领域。我想在表格上输入一年,这样我就可以选择那一年在他们的唱片中有Y的人。我可以在表单上的年份旁边创建一个复选框,但这似乎过度杀死,表单上的年份条目似乎更清晰。如果我的VBA代码符合要求,我会像在Fortran编码时那样对进程进行编码。

谢谢
Guess I should have been more specific. Sorry. I have a group of records of people and there are date/year fields for each of those records.
I have a dozen fields, named 2001, 2002, 2003, .... In each of those fields I have a Y or N. I have a form that I use to fill in those year fields and other fields. I''d like to enter a year on the form so I can select that year of people who have a Y in their record. I could create a check box next to the year on the form, but that seems like over kill and the year entry on the form seems cleaner. If my VBA code were up to snuff, I''d code the process like I did in the Fortran coding days.
Thanks


请上传mdb文件作为拉链,我会看看。
Please upload the mdb file as zip and I''ll have a look.


这篇关于使用表单选择表中​​的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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