Access中数据输入的2D表格 [英] 2d form for data entry in Access

查看:49
本文介绍了Access中数据输入的2D表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Access 2010,我想创建一个表单,用户可以像使用Excel格式一样输入数据.用户需要输入特定单元的步骤完成后的日期.

I'm using Access 2010 and I would like to create a form where useres can enter data much like they can in an Excel format. The users need to enter a date when a step is complete for a specific unit.

在Excel中,单位沿第一行行进,步骤沿左栏行进.在单元和步骤相遇的单元格中,输入完成日期.在Access中,创建看起来像这样的表单要困难得多(至少到目前为止对我来说是如此).我尝试使用交叉表查询,但是您不能在交叉表查询中输入信息.我可以做一个庞大的表格,列出每个单位和步骤的组合,但是有50多个单位,每个单位有63个步骤.我不希望用户仅输入完成的日期就必须浏览其中包含3,000行以上的表单.

In Excel the units run aross the top row, the steps run down the left column. In the cell where the unit and step meet, you put a date when it is done. In Access it is much harder to create a form that looks like this (at least it has been for me so far). I tried to use a crosstab query, but you cannot enter information into a crosstab query. I can do a massive form listing every combination of units and steps, but there are over 50 units and each one has 63 steps. I don't want users to have to look through a form with over 3,000 lines in it just to enter a date completed.

这绝对感觉是我们应该使用数据库而不是Excel电子表格的东西.我有后端表的格式来保存数据.我的问题是如何创建一个易于用户输入日期的表格.

This definitely feels like something we should be using a database for instead of an Excel spreadsheet. I have the format for the back end tables to hold the data. My problem is how to create a form that is easy for the user to enter the dates.

推荐答案

我认为您有三个选择.首先,您可以从头开始构建表单,您已经承认这很糟糕.而且需要大量的VBA才能在正确的位置获取数据.其次,您可以使Excel自动化-与第一种方法相同,但是不必构建表单.您将填充一个Excel电子表格,并将更改写回到数据库中.这不是一项琐碎的任务,我不建议这样做.

I think you have three options. First, you could build the form from scratch, which you've already admitted would suck. And it would take a lot of VBA to get the data in the right place. Second, you could automate Excel - it's the same as the first method but you don't have to build the form. You would populate an Excel spreadsheet and write the changes back to the database. This is not a trivial task and I don't recommend it.

第三个选择是放弃要在网格中执行此操作的想法.您可能已经在Excel中进行了此操作,并且在一定程度上进行了复制,因此您的用户将感到高兴和舒适.转移到数据库可以为您带来好处,但是却要付出代价.这是成本之一.

The third option is to throw away the idea that you want to do this in a grid. You've probably been doing it in Excel and to the extent that you replicate that, your users will be happy and comfortable. Moving to a database gives you benefits, but there are costs. This is one of the costs.

因此,创建一个包含所有单位的下拉菜单.选择一个单位后,填充一个子窗体(数据表视图),其中列出了所有过程和日期.然后,用户可以选择单位,并填写所需的任何程序旁边的日期.然后,他可以选择另一个单位并执行相同的操作.如果设置正确,数据将自动流到表中,您将获得数据验证,输入掩码,关系以及在表级别上使用的所有其他功能的所有好处.

So create a form with a dropdown containing all of the units. When a unit is selected, populate a subform (datasheet view) listing all of the procedures and dates. The user can then select the unit, and fill in the date next to whichever procedures he wants. Then he can select another unit and do the same thing. If you set it up right, your data will flow to the tables automatically and you'll get all the benefits of data validation, input masks, relationships, and whatever else you're using at the table level.

我知道这不是您想要的,但我认为这是最好的前进方式.

I know that's not what you were looking for, but I think it's the best way forward.

这篇关于Access中数据输入的2D表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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