By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,327 Members | 1,789 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,327 IT Pros & Developers. It's quick & easy.

Stuck in AfterUpdate with Form/Subform

P: n/a
I have a subform that, when updated should place a "Last Updated" time
stamp in the record using the following code:

Private Sub Form_AfterUpdate()
Me![LastUpdated] = Now()
End Sub

However, when I try to change records with the navigation buttons or
with a combo-box, i get no response. I do see the work "calculating"
appear in the status bar at the bottom of the screen. At this point,
all of the navigation buttons and all of the ocntrols on the main form
become unresponsive. The only way I can get the form to become
responsive is to hit the "Esc" key.

Any ideas what is causing this and how to resolve the problem?

thanks

May 23 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
For starters, put your assignment in the BeforeUpdate event. Make sure the
control bound to LastUpdated is not named the same as the bound field.

See if that gets you going. If not, let me know.
May 23 '06 #2

P: n/a
ew****@nycap.rr.com wrote:
I have a subform that, when updated should place a "Last Updated" time
stamp in the record using the following code:

Private Sub Form_AfterUpdate()
Me![LastUpdated] = Now()
End Sub

However, when I try to change records with the navigation buttons or
with a combo-box, i get no response. I do see the work "calculating"
appear in the status bar at the bottom of the screen. At this point,
all of the navigation buttons and all of the ocntrols on the main form
become unresponsive. The only way I can get the form to become
responsive is to hit the "Esc" key.

Any ideas what is causing this and how to resolve the problem?
No. But why update it after it has been updated? Put the LastUpdate
=Now() in the B4Update.

thanks

May 23 '06 #3

P: n/a
I have tried changing the event to BeforeUpdate and now I get an error
message saying "The expression Before Update you entered as the event
property setting produced the following error: Procedure declaration
does not match description of event or procedure having the same name."

May 23 '06 #4

P: n/a
Sounds like you manually inserted a BeforeUpdate event with the wrong
signature. Save the code from that event and delete the event.

Put your form in design view. Select the control we're discussing. View
the Properties sheet . select the event tab. Click on the Before Update
event line. Click on the "..." button and create an Event Procedure for the
control. When you land in the code, you will see the BeforeUpdate event
with the correct signature, created by the wizard.

Remember that code you saved. Paste it into this event shell and you're
good to go.
May 23 '06 #5

P: n/a
This fixed it!

Thank you all for you help.

Erik P.

May 24 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.