A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Creating an audit log



 
 
Thread Tools Display Modes
  #1  
Old December 14th, 2006, 10:06 AM posted to microsoft.public.access
George McDonald
external usenet poster
 
Posts: 17
Default Creating an audit log

I have used Allen Browne's article to create an audit log for my database. On
insert the work is listed fine on the audit table, listing everything that
has been added. The problem is when I edit the record. The edit is still on
the tmp table and all records have been deleted from the aud table. Can you
help please? I dont have a split database it is all together, could this be
the problem.
  #2  
Old December 14th, 2006, 10:32 AM posted to microsoft.public.access
Allen Browne
external usenet poster
 
Posts: 11,706
Default Creating an audit log

If you are referring to this article:
http://allenbrowne.com/AppAudit.html
it makes no difference whether the database is split.

While you are debugging, make sure the error handler is disabled at the top
of the 4 functions, by leaving the single quote at the start of this line:
'On Error GoTo ...

Now when if fails, you can see which line did not complete properly.

You can also add the a line to the top of each procedure containing just:
Stop
When it runs, it will stop at this line, and you can press F8 to execute one
line at a time, so you can check out what's going on.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"George McDonald" wrote in
message
...
I have used Allen Browne's article to create an audit log for my database.
On
insert the work is listed fine on the audit table, listing everything that
has been added. The problem is when I edit the record. The edit is still
on
the tmp table and all records have been deleted from the aud table. Can
you
help please? I dont have a split database it is all together, could this
be
the problem.



  #3  
Old December 14th, 2006, 10:45 AM posted to microsoft.public.access
Arvin Meyer [MVP]
external usenet poster
 
Posts: 4,231
Default Creating an audit log

I doubt if not splitting the database is the problem, but if you don't split
it you are asking to do much more work, and are enhancing the possibility of
corrupting your database. The only reason not to split a database is when it
is small and used by only 1 person directly from a workstation. ALL shared
databases should be split.

To answer your problem, I suspect that you've left out an important piece of
Allen's code. Download a new copy from his site, and compare it to your own.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"George McDonald" wrote in
message ...
I have used Allen Browne's article to create an audit log for my database.
On
insert the work is listed fine on the audit table, listing everything that
has been added. The problem is when I edit the record. The edit is still
on
the tmp table and all records have been deleted from the aud table. Can
you
help please? I dont have a split database it is all together, could this
be
the problem.



  #4  
Old December 14th, 2006, 11:32 AM posted to microsoft.public.access
George McDonald
external usenet poster
 
Posts: 17
Default Creating an audit log

Allen

The code is logging an error at auditeditbegin with Call LogError being
highlighted, any suggestions please.

George

"Allen Browne" wrote:

If you are referring to this article:
http://allenbrowne.com/AppAudit.html
it makes no difference whether the database is split.

While you are debugging, make sure the error handler is disabled at the top
of the 4 functions, by leaving the single quote at the start of this line:
'On Error GoTo ...

Now when if fails, you can see which line did not complete properly.

You can also add the a line to the top of each procedure containing just:
Stop
When it runs, it will stop at this line, and you can press F8 to execute one
line at a time, so you can check out what's going on.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"George McDonald" wrote in
message
...
I have used Allen Browne's article to create an audit log for my database.
On
insert the work is listed fine on the audit table, listing everything that
has been added. The problem is when I edit the record. The edit is still
on
the tmp table and all records have been deleted from the aud table. Can
you
help please? I dont have a split database it is all together, could this
be
the problem.




  #5  
Old December 14th, 2006, 11:41 AM posted to microsoft.public.access
Allen Browne
external usenet poster
 
Posts: 11,706
Default Creating an audit log

Ah: did you copy the LogError() function as well?
The link is:
http://allenbrowne.com/ser-23a.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"George McDonald" wrote in
message
...
Allen

The code is logging an error at auditeditbegin with Call LogError being
highlighted, any suggestions please.

George

"Allen Browne" wrote:

If you are referring to this article:
http://allenbrowne.com/AppAudit.html
it makes no difference whether the database is split.

While you are debugging, make sure the error handler is disabled at the
top
of the 4 functions, by leaving the single quote at the start of this
line:
'On Error GoTo ...

Now when if fails, you can see which line did not complete properly.

You can also add the a line to the top of each procedure containing just:
Stop
When it runs, it will stop at this line, and you can press F8 to execute
one
line at a time, so you can check out what's going on.

"George McDonald" wrote in
message
...
I have used Allen Browne's article to create an audit log for my
database.
On
insert the work is listed fine on the audit table, listing everything
that
has been added. The problem is when I edit the record. The edit is
still
on
the tmp table and all records have been deleted from the aud table. Can
you
help please? I dont have a split database it is all together, could
this
be
the problem.



  #6  
Old December 14th, 2006, 12:04 PM posted to microsoft.public.access
George McDonald
external usenet poster
 
Posts: 17
Default Creating an audit log

No I didnt Allen. Thanks for that I will copy this link and let you know how
I get on. Thanks again for your help.

George

"Allen Browne" wrote:

Ah: did you copy the LogError() function as well?
The link is:
http://allenbrowne.com/ser-23a.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"George McDonald" wrote in
message
...
Allen

The code is logging an error at auditeditbegin with Call LogError being
highlighted, any suggestions please.

George

"Allen Browne" wrote:

If you are referring to this article:
http://allenbrowne.com/AppAudit.html
it makes no difference whether the database is split.

While you are debugging, make sure the error handler is disabled at the
top
of the 4 functions, by leaving the single quote at the start of this
line:
'On Error GoTo ...

Now when if fails, you can see which line did not complete properly.

You can also add the a line to the top of each procedure containing just:
Stop
When it runs, it will stop at this line, and you can press F8 to execute
one
line at a time, so you can check out what's going on.

"George McDonald" wrote in
message
...
I have used Allen Browne's article to create an audit log for my
database.
On
insert the work is listed fine on the audit table, listing everything
that
has been added. The problem is when I edit the record. The edit is
still
on
the tmp table and all records have been deleted from the aud table. Can
you
help please? I dont have a split database it is all together, could
this
be
the problem.




  #7  
Old December 14th, 2006, 12:26 PM posted to microsoft.public.access
George McDonald
external usenet poster
 
Posts: 17
Default Creating an audit log

Allen, I have created a table tlogerror withe the fields listed in your
article. I have copied the code and saved it as a new module logerror. When I
run Debug compile it is stopping at Call Logerror at Err_Handler. Can you
help again please

George

"Allen Browne" wrote:

Ah: did you copy the LogError() function as well?
The link is:
http://allenbrowne.com/ser-23a.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"George McDonald" wrote in
message
...
Allen

The code is logging an error at auditeditbegin with Call LogError being
highlighted, any suggestions please.

George

"Allen Browne" wrote:

If you are referring to this article:
http://allenbrowne.com/AppAudit.html
it makes no difference whether the database is split.

While you are debugging, make sure the error handler is disabled at the
top
of the 4 functions, by leaving the single quote at the start of this
line:
'On Error GoTo ...

Now when if fails, you can see which line did not complete properly.

You can also add the a line to the top of each procedure containing just:
Stop
When it runs, it will stop at this line, and you can press F8 to execute
one
line at a time, so you can check out what's going on.

"George McDonald" wrote in
message
...
I have used Allen Browne's article to create an audit log for my
database.
On
insert the work is listed fine on the audit table, listing everything
that
has been added. The problem is when I edit the record. The edit is
still
on
the tmp table and all records have been deleted from the aud table. Can
you
help please? I dont have a split database it is all together, could
this
be
the problem.




  #8  
Old December 14th, 2006, 01:26 PM posted to microsoft.public.access
Allen Browne
external usenet poster
 
Posts: 11,706
Default Creating an audit log

What does the message say?

Syntax error?
Undefined function?
Other?

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"George McDonald" wrote in
message
...
Allen, I have created a table tlogerror withe the fields listed in your
article. I have copied the code and saved it as a new module logerror.
When I
run Debug compile it is stopping at Call Logerror at Err_Handler. Can you
help again please

George

"Allen Browne" wrote:

Ah: did you copy the LogError() function as well?
The link is:
http://allenbrowne.com/ser-23a.html

"George McDonald" wrote in
message
...
Allen

The code is logging an error at auditeditbegin with Call LogError being
highlighted, any suggestions please.

George

"Allen Browne" wrote:

If you are referring to this article:
http://allenbrowne.com/AppAudit.html
it makes no difference whether the database is split.

While you are debugging, make sure the error handler is disabled at
the
top
of the 4 functions, by leaving the single quote at the start of this
line:
'On Error GoTo ...

Now when if fails, you can see which line did not complete properly.

You can also add the a line to the top of each procedure containing
just:
Stop
When it runs, it will stop at this line, and you can press F8 to
execute
one
line at a time, so you can check out what's going on.

"George McDonald" wrote in
message
...
I have used Allen Browne's article to create an audit log for my
database.
On
insert the work is listed fine on the audit table, listing
everything
that
has been added. The problem is when I edit the record. The edit is
still
on
the tmp table and all records have been deleted from the aud table.
Can
you
help please? I dont have a split database it is all together, could
this
be
the problem.






  #9  
Old December 14th, 2006, 01:51 PM posted to microsoft.public.access
George McDonald
external usenet poster
 
Posts: 17
Default Creating an audit log

Compile Error
Expected variable or procedure,not module.

George

"Allen Browne" wrote:

What does the message say?

Syntax error?
Undefined function?
Other?

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"George McDonald" wrote in
message
...
Allen, I have created a table tlogerror withe the fields listed in your
article. I have copied the code and saved it as a new module logerror.
When I
run Debug compile it is stopping at Call Logerror at Err_Handler. Can you
help again please

George

"Allen Browne" wrote:

Ah: did you copy the LogError() function as well?
The link is:
http://allenbrowne.com/ser-23a.html

"George McDonald" wrote in
message
...
Allen

The code is logging an error at auditeditbegin with Call LogError being
highlighted, any suggestions please.

George

"Allen Browne" wrote:

If you are referring to this article:
http://allenbrowne.com/AppAudit.html
it makes no difference whether the database is split.

While you are debugging, make sure the error handler is disabled at
the
top
of the 4 functions, by leaving the single quote at the start of this
line:
'On Error GoTo ...

Now when if fails, you can see which line did not complete properly.

You can also add the a line to the top of each procedure containing
just:
Stop
When it runs, it will stop at this line, and you can press F8 to
execute
one
line at a time, so you can check out what's going on.

"George McDonald" wrote in
message
...
I have used Allen Browne's article to create an audit log for my
database.
On
insert the work is listed fine on the audit table, listing
everything
that
has been added. The problem is when I edit the record. The edit is
still
on
the tmp table and all records have been deleted from the aud table.
Can
you
help please? I dont have a split database it is all together, could
this
be
the problem.






  #10  
Old December 14th, 2006, 02:03 PM posted to microsoft.public.access
Allen Browne
external usenet poster
 
Posts: 11,706
Default Creating an audit log

Rename the module to "Module2" or something.

The modue's name must not be the same as the procedures, e.g. it must not be
called LogError.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"George McDonald" wrote in
message
...
Compile Error
Expected variable or procedure,not module.

George

"Allen Browne" wrote:

What does the message say?

Syntax error?
Undefined function?
Other?

"George McDonald" wrote in
message
...
Allen, I have created a table tlogerror withe the fields listed in your
article. I have copied the code and saved it as a new module logerror.
When I
run Debug compile it is stopping at Call Logerror at Err_Handler. Can
you
help again please

George

"Allen Browne" wrote:

Ah: did you copy the LogError() function as well?
The link is:
http://allenbrowne.com/ser-23a.html

"George McDonald" wrote in
message
...
Allen

The code is logging an error at auditeditbegin with Call LogError
being
highlighted, any suggestions please.

George

"Allen Browne" wrote:

If you are referring to this article:
http://allenbrowne.com/AppAudit.html
it makes no difference whether the database is split.

While you are debugging, make sure the error handler is disabled at
the
top
of the 4 functions, by leaving the single quote at the start of
this
line:
'On Error GoTo ...

Now when if fails, you can see which line did not complete
properly.

You can also add the a line to the top of each procedure containing
just:
Stop
When it runs, it will stop at this line, and you can press F8 to
execute
one
line at a time, so you can check out what's going on.

"George McDonald" wrote
in
message
...
I have used Allen Browne's article to create an audit log for my
database.
On
insert the work is listed fine on the audit table, listing
everything
that
has been added. The problem is when I edit the record. The edit
is
still
on
the tmp table and all records have been deleted from the aud
table.
Can
you
help please? I dont have a split database it is all together,
could
this
be
the problem.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.