473,399 Members | 4,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

How to set up db so one user sees only forms and other user has access to all?

AccessIdiot
493 256MB
I'm sure this has been asked a million times but I can't seem to find the answer I need.

I am working in Access 2007. I have a very simple project composed of one main table, several look up tables, one switchboard form, two other forms (one data entry form and one query/search form), and one report.

I need to set this up with two levels of access:

1) people entering data can only see the forms and report, no access to any tables. It would be great if they couldn't even see the tables.

2) one person with access to everything (not me, since i'm shipping this whole thing off to the folks I'm creating it for). This person may need to delete records from the main table or add values to the look up tables, etc.

One idea is to password protect the tables. Another idea is to split (?) the project into front end/back end. I've seen people mention this, and have seen NeoPa's write up (here) but in reality I have no idea how to do either. I'm not a coder, but can hack things together fairly well.

I'm told the project will be on one computer. There is no access to SQL Server or anything fancy/complicated. We're not concerned with people hacking the data, just want to avoid mistakes or people poking at tables they shouldn't.

Ideas? Thoughts? Advice?
Aug 11 '10
58 9777
AccessIdiot
493 256MB
Unfortunately not around the database on the weekend and my 4 yr old keeps me away from the computer mostly (she's asleep right now). I'll be back at it Monday morning PNW time. Have a great weekend!
Aug 21 '10 #51
NeoPa
32,556 Expert Mod 16PB
M, All your clever code is completely bypassed if you click on Exit (Your Command Button). Instead of closing serenely using :
Expand|Select|Wrap|Line Numbers
  1. Call DoCmd.Close
it quits Access immediately and irreversibly, using :
Expand|Select|Wrap|Line Numbers
  1. DoCmd.Quit
Also, assuming you want the database to close (rather than just the form or even the whole application), you should simply use :
Expand|Select|Wrap|Line Numbers
  1. Call CloseCurrentDatabase
In short, your Form_Close() subroutine should read :
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Close()
  2.   Dim strUser As String
  3.  
  4.     strUser = ";" & Environ("UserName") & ";"
  5.     If InStr(1, ";" & conClear & ";", strUser) > 0 Then
  6.  
  7.         If Not DBWindowVisible() Then _
  8.             Call DoCmd.SelectObject(ObjectType:=acForm, _
  9.                                     InDatabaseWindow:=True)
  10.     Else
  11.         Call CloseCurrentDatabase
  12.     End If
  13. End Sub
Everything else I could see worked exactly as expected (I even added in my ID and it switched me back to the Database Window on close, instead of dropping out of the database completely).

PS. Your cmdViewReport_Click() subroutine should say :
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdViewReport_Click()
  2.  DoCmd.OpenReport "rpt_Report", acViewPreview
  3. End Sub
acViewreport is not a valid parameter value (It's undefined). With that fixed the project compiles (which is always very important).
Aug 23 '10 #52
AccessIdiot
493 256MB
Thanks A, that cleans it up nicely. My code is very much hacked together as you can tell.

Still having an issue however. When I am logged in to my machine and I launch the db I don't get the navigation pane. If I right click on the switchboard form and select "close" then the form closes but I get the navigation pane.

This doesn't happen when my coworker tries it from his machine (his login), just mine. Any ideas?
Aug 23 '10 #53
NeoPa
32,556 Expert Mod 16PB
M:
Any ideas?
Only that this is exactly what I would expect to see. This is the whole idea we've been looking to implement, to have separate results for those in the list, from those not in it. The Database Window (Navigation Pane if you prefer) is designed (in this database) not to show until someone in the list closes out the database. At this point M (or A when I was running it) will get the Database Window left open and accessible, whereas all others will find that the database has been closed entirely, leaving only an open Access window.

What were you expecting that is different from this?
Aug 23 '10 #54
AccessIdiot
493 256MB
Got it. I was expecting that the nav panel would display as soon as the db was launched if the appropriate person was logged in. It is fine the way it is now, I just need to explain to the client what they should expect to see and how it works. Thanks A!
Aug 23 '10 #55
AccessIdiot
493 256MB
Another question: is there a way to remove the right click option to design forms (layout option too) for those that aren't allowed?
Aug 23 '10 #56
NeoPa
32,556 Expert Mod 16PB
M:
Got it. I was expecting that the nav panel would display as soon as the db was launched if the appropriate person was logged in.
That can easily be done that way too, if that would help. I figured it would simply clutter up the screen if the database is running. The current way, it shows either the running database, or the Database Window. Never both at the same time. Let me know if you'd prefer the Database Window to be open at all times for the selected users though.
Aug 24 '10 #57
NeoPa
32,556 Expert Mod 16PB
M:
Another question: is there a way to remove the right click option to design forms (layout option too) for those that aren't allowed?
Not that I'm familiar with. Similar code wouldn't do it I don't think. This is taking the solution well beyond the original stated requirement (which was fundamentally to make fiddling unobvious rather than blocked). If stronger protection is required then a whole different approach would be needed. We'd have to throw away and start again from scratch if this feature were important.
Aug 24 '10 #58
AccessIdiot
493 256MB
Nope, just thought I'd ask. I think making the tables not apparent is more important at this stage than protecting the design. Thanks again!
Aug 24 '10 #59

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: dan glenn | last post by:
(PHP 4.3.4) THIS IS DRIVING ME NUTS! I have a website where I offer members their own bit of webspace to use and am coding a very simple 'filemanager' that allows a user to upload, delete, and...
0
by: Ray Lavelle | last post by:
I'm new to VB .NET. In the past when creating an application, if I had an input form I would just call the set and get methods on the object that mapped to my database table in order to store and...
4
by: jwa6 | last post by:
I have a user/pc specific problem in access. This doesn't occur on any other ( windows xp pc) that I have used the ..mbd on. This involves a query that's using a range of dates as a parm. This...
1
by: Ed B | last post by:
I've been trying to connect to SQL Server 2000 through a web form created in c#. As I created my connection object the data source test succeeded. I've even tried the datapage wizard and I get...
6
by: zoltix | last post by:
Hi, I would like to access to execute specific commands but the privileges are not enough from an aspx Page. Because this service run as IU_IISSERVER, therefore aspx hasn’t access to these...
6
by: dbuchanan | last post by:
I have a Windows Forms application that accesses SQL Server 2k from a small local network. The application has been used for weeks on other systmes but a new install on a new machine retruns...
2
by: ashish | last post by:
I have written a simple forms authentication login page, where a user is redirected to default page after he is logged in ... the login page submit button looks like ...
15
by: =?Utf-8?B?QmVuamFtaW4gSmFuZWNrZQ==?= | last post by:
Hi, we're struggling with a strange session problem in an ASP.NET 2.0 application. The application is used by our customers to access customer-related information such as invoices over the...
2
by: Chris Zopers | last post by:
Hello, I have two UserControls on a aspx page. I need to read a property of the first UserControl from within the second UserControl. The UserControls only know about themselves, so I can't...
3
by: damola | last post by:
Good day everyone Please how can i prevent access to certain forms in ms access database 2007. i want it to be in such a way that when i enter user login,it automatically detects the forms the user...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...
0
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...

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.