[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 651
  • Last Modified:

Login Form

I have a login form that allows the user to enter the system.  Once you gain access, it opens a form (Search)  to login to access a record. I would like to tie the user that logged into the first form to the record that is searched.

Log in Form - Allows User to enter Database

Search Form - Allows User to search record using a specific ID

Any Suggestions are appreciated.

Thank You!
0
matheinjoe
Asked:
matheinjoe
  • 2
  • 2
1 Solution
 
peter57rCommented:
What do you mean by 'tie the user'?

Do you mean you want to stop the user from moving to a different record?
0
 
matheinjoeAuthor Commented:
No, I want to show that the User touched that record.
0
 
peter57rCommented:
Sounds like you are going to need to run an append query in the form current event procedure.

The append query should add a record to a log table identifying the record, the user and the time.

Dim str
str = "Insert into logTable(Recid, UName, TouchTime) Values( & me.recid & ",'" & currentuser & "',#" & Now() & "#")"
Currentdb.execute str, dbfailonerror
0
 
troyw1Commented:
You can access the currently logged in user with

User.Identity.Name
0
 
troyw1Commented:
Ignore that, I see you are Access programming; my comment was for ASP.NET.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now