• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 652
  • 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

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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