473,586 Members | 2,817 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Restricting what my user can see, howto?

My system is near finished, it is something quite basic where the
users interfer with the data via forms.

I want to limit my groups in what they can SEE from the database.
Like, I want my average users (groupe name: USERS) to only be able to
see one form, from where they will be provided with everything they
need for work, they won't see the macros, the table etc.. I also have
a second group (group name: RESP) that only need to see another form.

My users and groups' permissions works wonder, and by using access
built-in option I can only set opening parameter for everyone, I
cannot specify that I want different interface depending on which user
is logged. With the permissions they cannot open anything that is not
related to their work, but they can still see the object of the
database (table, request, forms, module etc..), and I want to hide
that stuff.

How can I do that ? (keep in mind that I am not a professionnal in
VB).
Nov 13 '05 #1
4 1492
I think this is likely to take a little VB -- I can't imagine a
fully-developed application being done without a good deal of VB. And a
fully-developed application is the only kind that can be both secured and
even a little user-friendly.

I assume that you have set proper permissions for the different groups to
view/use those forms. I also assume you open the forms with a
DoCmd.OpenForm. Put a check for the user's group before you execute the
DoCmd.OpenForm. To make it even more user friendly, you could check the
group and not even display the Command Button or other Control the user
clicks to Open the Form / Report, whatever.

Larry Linson
Microsoft Access MVP
"John Marble" <fr******@gmail .com> wrote in message
news:28******** *************** ***@posting.goo gle.com...
My system is near finished, it is something quite basic where the
users interfer with the data via forms.

I want to limit my groups in what they can SEE from the database.
Like, I want my average users (groupe name: USERS) to only be able to
see one form, from where they will be provided with everything they
need for work, they won't see the macros, the table etc.. I also have
a second group (group name: RESP) that only need to see another form.

My users and groups' permissions works wonder, and by using access
built-in option I can only set opening parameter for everyone, I
cannot specify that I want different interface depending on which user
is logged. With the permissions they cannot open anything that is not
related to their work, but they can still see the object of the
database (table, request, forms, module etc..), and I want to hide
that stuff.

How can I do that ? (keep in mind that I am not a professionnal in
VB).

Nov 13 '05 #2
Do you know about hiding the database window? If not, look at tools -
startup. There you can tell the program not to display the database window
at startup. You can also designate a form that will open when it starts. If
you select "Use Access Special Keys" then you and the users can hit F11 to
make the database window appear.

"John Marble" <fr******@gmail .com> wrote in message
news:28******** *************** ***@posting.goo gle.com...
My system is near finished, it is something quite basic where the
users interfer with the data via forms.

I want to limit my groups in what they can SEE from the database.
Like, I want my average users (groupe name: USERS) to only be able to
see one form, from where they will be provided with everything they
need for work, they won't see the macros, the table etc.. I also have
a second group (group name: RESP) that only need to see another form.

My users and groups' permissions works wonder, and by using access
built-in option I can only set opening parameter for everyone, I
cannot specify that I want different interface depending on which user
is logged. With the permissions they cannot open anything that is not
related to their work, but they can still see the object of the
database (table, request, forms, module etc..), and I want to hide
that stuff.

How can I do that ? (keep in mind that I am not a professionnal in
VB).

Nov 13 '05 #3
On Fri, 08 Jul 2005 17:57:56 GMT, "Larry Linson"
<bo*****@localh ost.not> wrote:

<snip>
I assume that you have set proper permissions for the different groups to
view/use those forms. I also assume you open the forms with a
DoCmd.OpenForm . Put a check for the user's group before you execute the
DoCmd.OpenForm . To make it even more user friendly, you could check the
group and not even display the Command Button or other Control the user
clicks to Open the Form / Report, whatever.

Larry Linson
Microsoft Access MVP

bouncer?

As I recall, to check what group the user is in you have to be in a
higher security group, which meant giving the user a fuller version
of the MDW file than necessary, and creating a workspace using the
username and password of an admin user which had therefore to be
embedded in the code. Admittedly you could make the code invisible to
users, but ...
Or maybe I was too lazy to write code which checked each group in turn
from users upwards.
David

Nov 13 '05 #4
Bri

John Marble wrote:
My system is near finished, it is something quite basic where the
users interfer with the data via forms.

I want to limit my groups in what they can SEE from the database.
Like, I want my average users (groupe name: USERS) to only be able to
see one form, from where they will be provided with everything they
need for work, they won't see the macros, the table etc.. I also have
a second group (group name: RESP) that only need to see another form.

My users and groups' permissions works wonder, and by using access
built-in option I can only set opening parameter for everyone, I
cannot specify that I want different interface depending on which user
is logged. With the permissions they cannot open anything that is not
related to their work, but they can still see the object of the
database (table, request, forms, module etc..), and I want to hide
that stuff.

How can I do that ? (keep in mind that I am not a professionnal in
VB).


In the Form that you use for Startup, make a call to this Function
(which you should put in a Module)

--
Bri

-------------
If UserInGroup("US ERS") Then
Me!UsersFormBut ton.Visible = True
End If
If UserInGroup("RE SP") Then
Me!RESPFormButt on.Visible = True
End If
-------------
Function UserInGroup(stG roup As String) As Boolean
Dim grp As DAO.Group
Dim grps As DAO.Groups

UserInGroup = False

Set grps = DBEngine(0).Use rs(CurrentUser( )).Groups

For Each grp In grps
If StrComp(grp.Nam e, stGroup, vbBinaryCompare ) = 0 Then
Exit For
End If
Set grp = Nothing
Next grp

If Not (grp Is Nothing) Then
UserInGroup = True
End If
Set grp = Nothing
Set grps = Nothing
End Function

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2704
by: Xenophobe | last post by:
I have a popup window (required by the client) containing a form and would like to prevent users from accessing it directly. They are instead required to access the page via a hyperlink on another page. HTTP_REFERER, while not completely reliable, would serve the purpose except for another problem. The hyperlink points to a JavaScript function...
4
2861
by: Josef Sachs | last post by:
Is Andrew Kuchling's regex-to-re HOWTO available anywhere? I've found the following (dead) links on various Web pages: http://py-howto.sourceforge.net/regex-to-re/regex-to-re.html http://starship.skyport.net/crew/amk/regex/regex-to-re.html http://www.python.org/doc/howto/regex-to-re/ http://www.amk.ca/python/howto/regex-to-re/ Thanks in...
0
1108
by: ATS | last post by:
HOWTO Extract resources from .NEt User Control and save them to file. Please help, I have a .NET C# User Control (derrived from System.Windows.Forms.UserControl), and I want to embed into it large EXE files as resources, which the User Control will extract when run, and save to file, and then run. How can this be done?
3
4657
by: volume | last post by:
Restricting a windows textbox (edit item) to digits only. Is there a windows option, using .NET C#, to only allow a user to enter digits ONLY? If so, what is the flag or setting? If no, what is the best method to manually and robustly do it? I have a windows form with an editbox that I only want user's to enter digits. Thanks in...
1
2167
by: Piper707 | last post by:
Hi, I'd like to know if there are any more ways of restricting an XML document to having only non-empty tags (containing Strings). I can think of 2 ways: 1) <xs:simpleType name="tagName">
0
988
by: WebMatrix | last post by:
Hello, What's the best way to keep email templates as html files on the server, so ASP.NET application can get file access to it, while restricting web users from accessing it through their browsers. The site is open to the public, no authentication is required, and web application runs under default iis user account. Thanks!
8
8704
by: sneddo | last post by:
Ok I am trying to do the above, I have got a script that will restrict the length but it requires the user to enter the field and hit a key, before it will work. This would normaly be find, but the title field gets its information from a previouse page so its value can easily be over 40 chars. (I can not restrict the length on the previouse...
2
2102
by: runway27 | last post by:
i am using apache server and presently when i try accessing any folders of my website i am able to browse the files ex = www.website.com/images which is a serious security risk as i am building a forum website using php and mysql. in the root directory i have created a .htaccess file and whenever someone access a file which is not ...
7
4036
by: shashi shekhar singh | last post by:
Respected Sir, I am really tired in solving of this issue that have been arises when i would like to restrict files to access only on my Test page , here i am retriving my files in iframe in Test page, problem occurs when a user authenticated themselves then they will be redirected on welcome page and he can access my files through welcome...
0
7911
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8200
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7954
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8215
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3836
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.