如何在Access窗体和数据表视图之间切换,并保留在同一条记录中,而无需过滤? [英] How do I switch between Access Form and Datasheet views, and remain on the same record, without filtering?

查看:304
本文介绍了如何在Access窗体和数据表视图之间切换,并保留在同一条记录中,而无需过滤?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MS Access 2007中,我想在数据表和表单视图之间切换,无需过滤,并保留在当前记录中。



我应该使用书签吗?怎么样 ?或者我如何在功能区上放置一个按钮来切换视图,而不必搜索记录或使用过滤器。



我需要这个来运行Access 2007 Runtime,因为它将在非许可计算机上实施。似乎一些丝带按钮&即使定义,组也不会显示:我尝试了功能区中的GroupViews和ViewsModeMenu选项,但它们在运行时不起作用。此外,任何将视图更改的功能区选项也会重新查询数据集中的第一条记录,而不是保留当前记录。

>你可能会拼凑一些可以在两个视图之间翻转的东西,但作为一般规则,用户点击一个按钮来创建一个继续表单可以启动一个详细信息表单。



试图控制连续窗体显示的方式和方式,而不是一种允许用户查看/编辑/打印/验证并简单地控制用户界面的形式,而这种形式表明您是FAR更好地启动另一个表单。而且,这不仅可以解决许多问题,而且还可以解决一两行代码问题,并且不会因为这种延续形式而让你的位置松动,从而允许用户启动+查看其他表单。
例如:

  Docmd.OpenFormfrmDetails,,,id =& me!id 

这里是屏幕截图,访问中继续表单的真正好处是按钮和对象为您重复:


另外还有一个:

alt text http://www.members.shaw.ca/AlbertKallal/Articles/gs3.gif

同样,请注意按钮是如何重复的,而上面的两个表单使用了我在上面发布的一行代码。



连续表单是一个很好的解决方案,我不认为它值得麻烦或努力尝试和意见之间翻转。上述想法对于运行时也很有效。


In MS Access 2007, I want to switch between datasheet and form views, without filtering, and remain on the current record.

Should I use a bookmark ? How ? or How might I place a button on the ribbon to switch views, without having to search for the record or use a filter.

I need this to run Access 2007 Runtime, since it will be implemented on a non-licensed computer. Seems some of the ribbon butttons & groups are not showing even if defined:

I tried the "GroupViews" and "ViewsModeMenu" options in the ribbon but they do not work in the Runtime. Also, any ribbon options that change the view also requery to the first record in the dataset, instead of retaining the current record.

解决方案

You could probably cobble together something that flips between the two views, but as an general rule, you far better off to build an continues form with a button that the user clicks on to launch a details form.

Trying to control how and what the continues form displays as opposed to a form that allows the user to view/edit/print/verify and simply control the user interface in a reasoned manor suggests that you are FAR BETTER off to launch another form. And, not only does this solve a host of problems, but it only one or 2 lines of code, and you don't loose your spot in that continues form to allow the user to launch + view other forms. Eg:

Docmd.OpenForm "frmDetails",,,"id = " & me!id

Here is screen shot, and what really nice about continues forms in access is buttons and objects repeat for you:

And, here another one:

alt text http://www.members.shaw.ca/AlbertKallal/Articles/gs3.gif

Again, note how the button just repeats, and the above two forms uses the one line of code I posted above.

Continues forms are a great solution, and I don't think it worth the trouble or efforts to try and flip between the views. And the above ideas work well for runtime also.

这篇关于如何在Access窗体和数据表视图之间切换,并保留在同一条记录中,而无需过滤?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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