473,756 Members | 4,511 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems creating an Auditing facility

Hi All,

I need some help regarding the creation of an auditing facility with
Access 97. First off, let me say that the following design is not my
idea but I'm in the unfortunate position of trying to implement it
somehow.

First, the user(s) require that certain fields be audited to see who
the data was last changed by and when it was changed. They initially
wanted this data to be in the ControlTip Text so they could see it by
simply hovering over the relevant control. After a large amount of
"heated" debates on the matter, they decided that they wanted some
hidden controls (a couple of text boxes and labels) that would appear
when the control had focus and then vanish when the next control is
selected. This in itself is easy enough but the text boxes where the
data is to appear is supposed to be disabled to stop anyone updating
the text with other data (although why anyone would do this escapes
me). With my limited knowledge of Access, I've set the controls to
appear when the control has focus and using the After Update event I've
set the text boxes to receive data from code that runs once the
original control is updated. One of the 2 text boxes is set to receive
the output from the Now() function and the other from the CurrentUser()
function (both built in functions). The text boxes are attached to
relevant columns in the table/query that feeds the form but I continue
to get an error that says the control can't be updated unless it has
focus.

I've tried to set focus to the relevant control before the update but
to no avail. I've even tried leaving the text box visible, enabled and
everything else but I'm currently banging my head against the
proverbial brick wall so any help you can offer would be most welcome.

If there is anyone who has another idea to record the person/time who
last updated a record then I'd be very grateful.

Many thanks in advance.

Dean...

Jan 30 '06 #1
3 1469
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I usually use the Form's BeforeUpdate event. E.g.:

Private Sub Form_BeforeUpda te(Cancel As Integer)

' User & Updated have to be part of the form's recordset.
Me.User = CurrentUser()
Me.Updated = Now()

End Sub

--
MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQ958qYechKq OuFEgEQINHQCgjI Q5CxuI8Pon5k0TV jFPyyJNyNIAoIfZ
nUiOZkcnFMrIpgV cNEh2wFZk
=Ibqr
-----END PGP SIGNATURE-----
DeanL wrote:
Hi All,

I need some help regarding the creation of an auditing facility with
Access 97. First off, let me say that the following design is not my
idea but I'm in the unfortunate position of trying to implement it
somehow.

First, the user(s) require that certain fields be audited to see who
the data was last changed by and when it was changed. They initially
wanted this data to be in the ControlTip Text so they could see it by
simply hovering over the relevant control. After a large amount of
"heated" debates on the matter, they decided that they wanted some
hidden controls (a couple of text boxes and labels) that would appear
when the control had focus and then vanish when the next control is
selected. This in itself is easy enough but the text boxes where the
data is to appear is supposed to be disabled to stop anyone updating
the text with other data (although why anyone would do this escapes
me). With my limited knowledge of Access, I've set the controls to
appear when the control has focus and using the After Update event I've
set the text boxes to receive data from code that runs once the
original control is updated. One of the 2 text boxes is set to receive
the output from the Now() function and the other from the CurrentUser()
function (both built in functions). The text boxes are attached to
relevant columns in the table/query that feeds the form but I continue
to get an error that says the control can't be updated unless it has
focus.

I've tried to set focus to the relevant control before the update but
to no avail. I've even tried leaving the text box visible, enabled and
everything else but I'm currently banging my head against the
proverbial brick wall so any help you can offer would be most welcome.

If there is anyone who has another idea to record the person/time who
last updated a record then I'd be very grateful.

Jan 30 '06 #2
Thanks MG,

Unfortunately, there are several fields on the form that require
auditing with the date changed and the username. I've created new
fields in the tables that feed the form (e.g. the Location field has
two other fields that I need updated called LocationAudit1 and
LocationAudit2 where the first records the date and the second records
the username when someone changes the Location field for that
particular record). The before update event would be fine if there was
only one item that needed auditing.

Dean...

Jan 30 '06 #3
Use the AfterUpdate event of the control being audited

Private LocationAudit_A fterUpdate()
Me!LocationAudi t1 = Now
Me!LocationAudi t2 = CurrentUser
End Sub
*** Sent via Developersdex http://www.developersdex.com ***
Jan 31 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5750
by: Irmen de Jong | last post by:
Hi I'm trying to create e-mail content using the email.MIMEText module. It basically works, until I tried to send mail in non-ascii format. What I did, to test both iso-8859-15 and UTF-8 encodings, was this: ---- from email.MIMEText import MIMEText m=MIMEText(u"body text including an Euro char \u20ac\n", _charset="iso-8859-15") m = "from@mail.invalid"
5
6055
by: Lili | last post by:
I'm having problems creating a simple stored procedure in DB2. Can someone help? Here is the screen dump when I tried to load the stored procedure. Thanks for any help. Create procedure update_salary (in emp_number char(6), in rate integer) language sql begin update employee
2
1211
by: | last post by:
Hi all, I have vs.net 2003 locally installed on my XP PRO machine. I have a web server on the LAN which has a website configured at http://services. This is accessible via my web browser and already has a web service (built using sdk and notepad) at http://services/services/services.asmx. Now I am trying to create a new web service "services2.asmx" in vs.net. I click on File-->New-->Project. Then select Asp.net Web Service under VB...
1
6363
by: Ir0neagle | last post by:
I am generating upgrade/new install scripts for my project. I am able to do this in oracle and sql server but an running into problems in db2. What I am trying to do is to use some logic to only create table that have not been generated in prevous releases. I am trying to create a stored procedure to do this. I am not able to create the stored procedure because it errors out with the error below. I am stumped as how to get around this...
2
1229
by: GGawaran | last post by:
Ive setup the MySQL server and am using heidi to create the tables, Ive had no trouble creating any new databases or certain tables. But my problem im running into right now, im trying to create a tabel called customer_nfo with one variable for ID not null unsigned auto increment, then another with first_name not null. ill post the code that heidisql posts CREATE TABLE customer_info (ID MEDIUMINT (10) UNSIGNED DEFAULT '0' NOT NULL...
6
1782
by: Charlie Bear | last post by:
i'm really stuck with this one can anyone help! i have a website that uses c#. it creates a series of directories and files from an xml source. when the xml changes, the directory that the change applies to is deleted and recreated. All the children for that directory are also re created (as the parent directory then has a different name). the problem i have is that *sometimes* the files or directories don't get created. It either...
1
1807
by: MichaelZ | last post by:
After all is done, I want query(s) which will give me the ability to create a report which will allow me to compare 3 apts with the parameters equaling bedroom size, and rents which are equal or greater to the tenant's current rent and bedroom size. The first problem: Creating a field which will output a result which is contingent to what was inputed on the Bedroom Size. The apt.bedx is the cost of the rent. (spelled out for one field)...
6
2034
by: Pep | last post by:
Firstly, I'm not sure if this is the right group for this query, so please forgive me if I am wrong. My problem is that most users I distribute my software to cannot install it on their systems due to not having the correct administrator rights. I'm perplexed over this as I cannot reasonably ask corporations to allow the local secretary to have admin or power user rights just to install my software. My software is intended for user...
0
1024
by: Scott McNair | last post by:
My apologies for crossposting this; I originally posted it to m.p.d.l.vb.data, but then I noticed that the group is not very active so I decided to post here as well. Subject: Problems creating a TVF From: Scott McNair <smcnair@beachexpress.takethispartout.com> Newsgroups: microsoft.public.dotnet.languages.vb.data Hi,
0
10031
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9869
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9838
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5140
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2665
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.