473,378 Members | 1,346 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,378 software developers and data experts.

Multi user login screen - question about tracking logged in users

Hi,

I currently have a working multi user login form which automatically directs users to the relevent forms e.g. general staff have access to a form called staff1 and staff2 whereas managers have access to a form called manager1. I have used the following code:

Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Private Sub Login_Click()
  3. UserName.SetFocus
  4. If UserName = "Staff1" And Password = "Staff1" Then
  5. MsgBox "Welcome"
  6. DoCmd.Close
  7. DoCmd.OpenForm "Staff1"
  8. ElseIf UserName = "Staff2" And Password = "Staff2" Then
  9. MsgBox "Welcome"
  10. DoCmd.Close
  11. DoCmd.OpenForm "Staff2"
  12. ElseIf UserName = "Manager1" And Password = "Manager1" Then
  13. MsgBox "Welcome, please exercise caution when changing query or table conditions", vbInformation, "CDSignatures"
  14. DoCmd.Close
  15. DoCmd.OpenForm "Manager1"
  16. Else
  17. MsgBox "Please re-enter Username and Password"
  18. End If
  19. End Sub
  20.  
My question is how can I track users once they have logged in. I have a database which tracks data that has been editted from the main database and I would like to know how to show which user has done this.

Thanks in advance.
Oct 29 '12
55 9646
Hi Everyone, I know it has been a while since my last post and this is because everything now works fine and i haven't had the time to get back online to thank you all for all of your help.
Dec 5 '12 #51
NeoPa
32,556 Expert Mod 16PB
I'm pleased to hear that, but it may be helpful to anyone reading the thread if you posted an explanation of why it wasn't working and what you changed at that point to make it work.
Dec 5 '12 #52
I was able to login as normal using the code from post 35. However, it was not updating the usyscurrentuser table. I fixed this by changing the source of the form from nothing to the usyscurrentuser table. This worked, now when I log in it adds a new record into this table. Probably not the best way to sort the problem but it has worked and I am happy with it.
Dec 12 '12 #53
NeoPa
32,556 Expert Mod 16PB
Probably not a bad solution as it happens. It won't normally add a new user BTW, but update the existing one. At least after the first time. This is lucky, as if it added one it would be fundamentally useless to the process.

Z:
It is a known bug in the editor (at least to those of us that do a lot of programing) the MS doesn't seem to (or care to) want to fix.
I consider myself reasonably experienced in that area, but I hadn't heard that before ;-) I'll certainly bear it in mind in future. It does mean the code needs to be recompiled anyway - unless the object is closed without saving I suppose. Food for thought.
Dec 12 '12 #54
zmbd
5,501 Expert Mod 4TB
Usually happens when the breakpoint trips and/or stepping thru code: then code is edited while in the debug state. Google "phantom break point." Been around since at least 97 when I first encountered it... wouldn't be surprised if there isn't something here on BYTES :)
(found one: http://bytes.com/topic/access/answer...en-starting-pc :)
Dec 12 '12 #55
NeoPa
32,556 Expert Mod 16PB
Oh that issue. I've had that a few times. Like one of the posters in the linked thread, I will simply add an edit, recompile and save. Typically though, although I will change code while running during the development cycle, I will redo it for release, and I never save an object with any breakpoints set, for that reason. Sometimes, with an object that is already supposed to be ready for release, but I have to make small tweaks to it, I'll close the object without saving, but after I've copied all the code to the clipboard, then reopen it, replace the code with the new, and close and save it then.

I've never seen this talked about before though. I just came up with my work-arounds after experiencing the problem a few times.

I still use breakpoints though, just within the parameters explained above. Clearly it makes sense to advise against relying on them for general consumption though. Good work as usual :-)
Dec 12 '12 #56

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

Similar topics

1
by: Job Lot | last post by:
In a multi-user environment, how would I prevent users from adding Orders with identical OrderID. For instance I have following tables in my database Order ================== OrderID Identity...
1
by: Marcin Zmyslowski | last post by:
Hello all! I want to create a page in ASP language which gives me information about currently logged users. I thought to do it by this way: when somebody will log in to page, there will be a...
9
by: dana lees | last post by:
Hello, I am developing a C# asp.net application. I am using the authentication and authorization mechanism, which its timeout is set to 60 minutes. My application consists of 2 frames - a...
2
by: planetthoughtful | last post by:
Hi All, I'm returning to coding in Access after a break of about 4 years, and designing a multi-user app split between a front end mdb for forms / code etc and a backend mdb for tables. I'm...
2
by: john | last post by:
Is it true that if I split my access database in backend and frontend and I implement custom auto increment for the ID fields, that my database is ready to be used in a multi-user environment? I...
3
by: bala | last post by:
Hi Gurus The scenario A MS Access frontend application with Oracle Backend (Linked Tables). The Database UserID and password is not stored and each user has a unique UserID and password. There...
4
by: TJO | last post by:
Can someone advise about feasibility of passing user credentials to an asp.net 2.0 application using query string or other techniques? I want to avoid the login screen. Thank you.
3
by: freee8896 | last post by:
Can nyone help me with this multi user login from the same system. Multiple users must be able to login from the same system at a time.... in PHP. Sessions must be used. Please donot suggest these...
11
Stang02GT
by: Stang02GT | last post by:
I am in the process of creating a database for a "Team" here at work. One thing that needs to be incorporated with this database is each user will have a log in and password I know how to do that. ...
4
cobra35y
by: cobra35y | last post by:
Good Afternoon, I am new to the world of programming. after reviewing this site for info pertaining to my situation, i have declared a loss and posting for help. maybe i am just overlooking the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.