This is probably sooo simple...

lmnop7854

Quittin' Time
Local time
Today, 08:09
Joined
Nov 30, 2004
Messages
313
I searched the forum to find information on this, but I only found bits and pieces. I have a form that many other people will be using, and it is associated with one table. When a person completes their part of the entry on the form, I have a text box field for them to fill in their name, and then I would like the date field in the underlying table to update with the current date. The date field is not on the form (saving space). How do I do this? I tried doing something on After Update in the name field, but it didn't work. Any ideas?

Lisa
 
It is called DateTime stamping a record and it is accomplished in the BeforeUpdate event of the form.
 
RuralGuy said:
It is called DateTime stamping a record and it is accomplished in the BeforeUpdate event of the form.

Ok, I think I could handle that if it was for the whole form, but this form will be passed from one person to the next, and they will need to fill in their part and sign, so there are a few different date fields that I want updated in this manner. How would I do it individually, so that each time a person signs, their date field fills in the date they signed?

Lisa
 
...but this form will be passed from one person to the next, and they will need to fill in their part and sign...
How do you plan to achieve this part? You are using language as if it is a piece of paper and I'm afraid I'm just a little confused. :confused:
 
RuralGuy said:
How do you plan to achieve this part? You are using language as if it is a piece of paper and I'm afraid I'm just a little confused. :confused:


Well, it kind of will be used in that fashion. The database will be on a shared drive so that each person will have access to it, and they will have specific sectionc of the form to fill out. Once complete, they enter their name, and that ends their responsibility, it moves on the the next person.

Again, the date fields are not on the form. I just want the information in the associated table. So where would I use the Before Update event?

Lisa
 
You could use the AfterUpdate event of your controls. Then depending on what part of the form is being completed you complete the appropriate timestamp field.
 
RuralGuy said:
You could use the AfterUpdate event of your controls. Then depending on what part of the form is being completed you complete the appropriate timestamp field.

Ok, I tried the After Update event, and I put in the expression

[Associated_Table]![Date_field] = Now()

and I am getting an error that says

"the object doesn't contain the object 'Associated_Table'". Any ideas how to fix this?

Lisa
 
Lisa,
Is your Form bound to a query/table of the [Associated_Table] table? If so then just using [Date_field] = Now() in the BeforeUpdate event should work. If not, then there are other issues to resolve.
 
If you make your date field a hidden textbox on your form it would make it easier to manipulate the date.
 
RuralGuy said:
Lisa,
Is your Form bound to a query/table of the [Associated_Table] table? If so then just using [Date_field] = Now() in the BeforeUpdate event should work. If not, then there are other issues to resolve.

It is, but I have changed the table a lot, and I am thinking that is the problem. I may have to start all over.
 
jkl0 said:
If you make your date field a hidden textbox on your form it would make it easier to manipulate the date.

Yeah, I tried that, and that didn't work either. Thanks for your help.

Lisa
 
If the date field is now on the form it should be a simple matter to set the date field = Date() before saving the form.


The only complication is if you need mutiple names signing off the record on multiple dates.


Just post the db? for someone to look at.
 

Users who are viewing this thread

Back
Top Bottom