[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to do the event log in Access 97?

Posted on 1997-12-16
5
Medium Priority
?
241 Views
Last Modified: 2012-08-13
Hello!

      I like to know how to provided the event log in Access 97 by using the security provided by Access 97. Is mean that the I not need to create my own password form screen
by weitten coding in module instead to create the event log. have any shortcut to doing .

    Thank you!


sean yeo

0
Comment
Question by:seanyeo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 12

Expert Comment

by:Trygve
ID: 1962813
Could you please refrase the question.

Do you want to log the users activity or do you want to do user administration ?
0
 
LVL 9

Expert Comment

by:cymbolic
ID: 1962814
In VBA 5.0, there are two new methods on the app object, .startlogging and .logevent that allow you to place items in the system (or if 95, your own) event log.
0
 
LVL 12

Expert Comment

by:Trygve
ID: 1962815
No such thing as .startlogging and .logevent in Access 97 as far as I know.
0
 

Author Comment

by:seanyeo
ID: 1962816
Beside the VB5.0 Method, have anyway to do it in Access 95.
0
 
LVL 12

Accepted Solution

by:
Trygve earned 120 total points
ID: 1962817
If you want to keep track of the user activity: which forms they open, reports preview/printed macros executed etc. the best thing to do is to make an EventLog table. Something like this might do the trick:

Login     ' UserID
DateTime  '  
EventType ' OpenReport, OpenForm etc.
Object    ' Name of object handeled.

Then when you open a report from a button or otherwise the following lines of code will log the event

dim EventType as string
dim ObjectToHandle
TypeOfEvent="PreviewReport"
ObjectToHandle="MyReportName"

DoCmd.RunSQL "INSERT INTO SD_EventLog ( Login, [DateTime], EventType, Object ) SELECT DISTINCTROW CurrentUser() AS Login, Now() AS [DateTime], '" & TypeOfEvent & "' AS EventType, '" & ObjectToHandle & "' AS Object;"

The code can be easily adapted to your needs.

The CurrentUser() function is used to ID the user. This function returns the ID the user logged on to Access with.


Hope this helps!
Trygve
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question