?
Solved

App.StartLogging method is not working.

Posted on 1998-12-10
5
Medium Priority
?
775 Views
Last Modified: 2013-11-26
When I try to use the App.startlogging method and the app.logevent to log events happening in my application, I get no results.  I then began to use the App.logmode property to check to see if the app.startlogging method was working, and it does not seem to be producing any changes.  For example...

Using the following code

Msgbox app.logmode
msgbox app.startlogging "Testfile.log", 2
msgbox app.logmode

For each message box, I get a zero result.  I figure I'm doing something stupid, but don't have any documentation that mentions error logging.
0
Comment
Question by:jsuper
[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
5 Comments
 
LVL 3

Expert Comment

by:jjbyers
ID: 1449333
You need to use the logevent method of the app object.
0
 
LVL 1

Author Comment

by:jsuper
ID: 1449334
In the original question I mention that I use the logevent method to try to post messages to the log.  The problem is that those messages are never getting into the log because my original attempt to turn logging on failed.

0
 
LVL 4

Expert Comment

by:chabaud
ID: 1449335
Are u using win95 or winNT ?
0
 
LVL 3

Accepted Solution

by:
covington earned 200 total points
ID: 1449336
Compile your app. It will work fine.


INFO: App.LogEvent Only Logs in Compiled Applications
Article ID: Q161306
http://support.microsoft.com/support/kb/articles/q161/3/06.asp 
 


--------------------------------------------------------------------------------

The information in this article applies to:
Microsoft Visual Basic for Windows Learning, Professional, and Enterprise Editions, versions 5.0, 6.0
Microsoft Visual Basic Control Creation, Learning, Professional, and Enterprise Editions, for Windows, version 5.0


SUMMARY
In Microsoft Visual Basic, Event Logging allows an application to add information to either a user-defined file or the Microsoft Windows NT Event Log when a user-defined criteria is met.

This functionality is only available when running a compiled application. If you attempt to use the logging methods while in the Microsoft Visual Basic development environment, the logging methods will be ignored.
0
 
LVL 1

Author Comment

by:jsuper
ID: 1449337
Thanks for the info...   That did the trick!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

800 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