Change date

Dinictus

Registered User.
Local time
Today, 20:36
Joined
Nov 30, 2004
Messages
22
Hi,

I have a small dbase with some tables related to eachother and so on.
Now I want to track the last change that has been done to a certain customer. Can this be done i a not too complicated way? :confused:

like: last change: 11/01/2005
 
hmmz, thnks!

I tried your last solution. Tried inserting syntax in the control source but I can't get it to work.


I have added the date field but how would the syntax look like? :confused:
 
Easisest is just to have the textbox on your form (hidden if you want)

And to put in the BeforeUpdate() event,

Me.MyTextBox = Now
 
The beforeupdate event of your form I guess.
damn I'm a dummy. cos I can't get it to work.
 
Make sure you are putting the code in a procedure, not in the property box itself. At the right edge of the property box is the builder button. Press the button and choose the code option. Type the line of code in the procedure where the cursor is sitting.
 
Yes I get the code builder and stuff but I seem to be in the wrong event.
What woudl the sub be called for before updating a form called Levelone?

If I stand on the form and and right click and build an event, the sub for the code is automatically called: detail_click.
 
while you are in the design view of your form, go to View -> Properties at the top. Then Click on the Event tab and select the BeforeUpdate event. you should get the following:

Private Sub Form_BeforeUpdate(Cancel As Integer)

End Sub

Then you can place the suggessted line of code between the above two lines.
 
WHAA

It work! Thnks alot.
Stange how the you get more properties if youy selct properties from the toolbar than when you selct via right click.

once again. Thnks
 
If you got "detail_click" as an event name, you did not have the form selected when you opened the builder. Sounds like you had the detail section selected. When the form is selected, there will be a black square in the upper left hand corner.
 
Adding an Audit Trail to your db is very easy if you want to track who modified what. Check out the "audittrail.zip" sample db in this thread... Audit Trail
 

Users who are viewing this thread

Back
Top Bottom