如何使Access窗体自动打开用户的数据? [英] How do I make an Access Form automatically open to a user's data?

查看:424
本文介绍了如何使Access窗体自动打开用户的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想写VB code,将允许访问识别打开数据库的用户的计算机ID,打开窗体和筛选,以分配给用户的记录。有谁知道如何实现这一目标?

I am trying to write VB code that would allow Access to recognize the computer ID of the person opening the database, open a form, and filter to the records assigned to the user. Does anyone know how to accomplish that?

推荐答案

这是 API来获取用户名可能比使用 ENVIRON 更好。如果名称可在一个表中,可以使用的使用DLookup 获得一个ID,可以用的在哪里DoCmd对象的OpenForm方法来打开过滤列表的说法。

An API to get the user name is probably better than using Environ. If the name is available in a table, you can use DLookUp to get an ID, which can be used with the Where argument of the OpenForm method of the DoCmd object to open a filtered list.

这篇关于如何使Access窗体自动打开用户的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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