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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Audit log for 1 field



 
 
Thread Tools Display Modes
  #1  
Old November 24th, 2009, 09:18 PM posted to microsoft.public.access.forms
BenEl
external usenet poster
 
Posts: 1
Default Audit log for 1 field

Hi. I am trying to create an audit log for a "tasks" database.I used Allen
Browne's code and got it working on a very simple test database. When I try
to do the exact thing in my production database, it gets stuck at:

'Remove any cancelled update still in the tmp table.
Set db = DBEngine(0)(0)
sSQL = "DELETE FROM " & sAudTmpTable & ";"
db.Execute sSQL

My production form has alot on it (combo lookups, date pickers, option groups,
and some code behind some text boxes, etc). Would this affect it? I'm really
only interested in tracking changes from 1 field. How can I modify Allen's
code to do this and stop erroring out?

Thanks!

  #2  
Old November 24th, 2009, 10:23 PM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Audit log for 1 field

What does "gets stuck" mean? Do you get an error? If so, what's the error?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"BenEl" u56454@uwe wrote in message news:9f9c5f2324d32@uwe...
Hi. I am trying to create an audit log for a "tasks" database.I used Allen
Browne's code and got it working on a very simple test database. When I
try
to do the exact thing in my production database, it gets stuck at:

'Remove any cancelled update still in the tmp table.
Set db = DBEngine(0)(0)
sSQL = "DELETE FROM " & sAudTmpTable & ";"
db.Execute sSQL

My production form has alot on it (combo lookups, date pickers, option
groups,
and some code behind some text boxes, etc). Would this affect it? I'm
really
only interested in tracking changes from 1 field. How can I modify Allen's
code to do this and stop erroring out?

Thanks!



  #3  
Old November 25th, 2009, 02:08 PM posted to microsoft.public.access.forms
BenEl via AccessMonster.com
external usenet poster
 
Posts: 18
Default Audit log for 1 field

"Syntex error in FROM clause".

I don't understand this error, because the code is copied straight from
Allen's website and worked perfectly in my test dbase.


Douglas J. Steele wrote:
What does "gets stuck" mean? Do you get an error? If so, what's the error?

Hi. I am trying to create an audit log for a "tasks" database.I used Allen
Browne's code and got it working on a very simple test database. When I

[quoted text clipped - 14 lines]

Thanks!


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200911/1

  #4  
Old November 25th, 2009, 03:51 PM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Audit log for 1 field

If sAudTmpTable contains special characters (which includes spaces), try

sSQL = "DELETE FROM [" & sAudTmpTable & "];"

If it doesn't, what's the actual content of sSQL when the code fails?


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"BenEl via AccessMonster.com" u56454@uwe wrote in message
news:9fa530926c82e@uwe...
"Syntex error in FROM clause".

I don't understand this error, because the code is copied straight from
Allen's website and worked perfectly in my test dbase.


Douglas J. Steele wrote:
What does "gets stuck" mean? Do you get an error? If so, what's the error?

Hi. I am trying to create an audit log for a "tasks" database.I used
Allen
Browne's code and got it working on a very simple test database. When I

[quoted text clipped - 14 lines]

Thanks!


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200911/1



  #5  
Old November 25th, 2009, 06:40 PM posted to microsoft.public.access.forms
BenEl via AccessMonster.com
external usenet poster
 
Posts: 18
Default Audit log for 1 field

So that worked! Now I'm getting the error:

" SELECT* can not be used in an INSERT INTO query where the source or
destination table contains a multivalued field".

I have a few of these. I don't want to capture the changes for these fields.
How can I adopt the code to only look at one specific field?

Thanks.


Douglas J. Steele wrote:
If sAudTmpTable contains special characters (which includes spaces), try

sSQL = "DELETE FROM [" & sAudTmpTable & "];"

If it doesn't, what's the actual content of sSQL when the code fails?

"Syntex error in FROM clause".

[quoted text clipped - 9 lines]

Thanks!


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200911/1

  #6  
Old November 25th, 2009, 08:14 PM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Audit log for 1 field

In AuditEditEnd, you have to change sSQL so that it picks selected fields,
not *.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"BenEl via AccessMonster.com" u56454@uwe wrote in message
news:9fa78f1eb9a06@uwe...
So that worked! Now I'm getting the error:

" SELECT* can not be used in an INSERT INTO query where the source or
destination table contains a multivalued field".

I have a few of these. I don't want to capture the changes for these
fields.
How can I adopt the code to only look at one specific field?

Thanks.


Douglas J. Steele wrote:
If sAudTmpTable contains special characters (which includes spaces), try

sSQL = "DELETE FROM [" & sAudTmpTable & "];"

If it doesn't, what's the actual content of sSQL when the code fails?

"Syntex error in FROM clause".

[quoted text clipped - 9 lines]

Thanks!


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200911/1



  #7  
Old November 30th, 2009, 06:17 PM posted to microsoft.public.access.forms
BenEl via AccessMonster.com
external usenet poster
 
Posts: 18
Default Audit log for 1 field

Thanks. Unfortunately the user has decided that they would now like to be
able to modify past entries...Onto a new tactic!

Douglas J. Steele wrote:
In AuditEditEnd, you have to change sSQL so that it picks selected fields,
not *.

So that worked! Now I'm getting the error:

[quoted text clipped - 18 lines]

Thanks!


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200911/1

 




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 05:30 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.