473,397 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Stuck in AfterUpdate with Form/Subform

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
5 3790
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
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
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
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
This fixed it!

Thank you all for you help.

Erik P.

May 24 '06 #6

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

Similar topics

3
by: jdph40 | last post by:
In Access 2002, I designed a simple database for our Safety department to enter results of a survey. There are 41 true/false statements. I have a main form called frmSurvey with a subform called...
2
by: jv | last post by:
Hello, I have a Service Cancellation form that contain a CancelDate text box. The text box has an AfterUpdate event that perform a few calculations. This works fine. However, next to the text...
0
by: rivka.howley | last post by:
I have a subform with a couple of event procedures. One is the afterupdate event for a control on the subform. This one works fine. The other is the afterupdate event for the subform itself. The...
2
by: sara | last post by:
Hi - I have been trying (for 2 days now) to make some simple surveys (5-7 questions each, each with 2-3 answer choices, always from the list) using Duane's sample. I've searched and searched...
3
by: strods | last post by:
Hey everyone, I really want to thank everyone for their assistance in times past. I am learing a bit here. I have a question though. Now that you've been so kind I've been ablt to use the...
4
by: bcallnan | last post by:
Hello All- I am trying to reference a subform's afterupdate event that is 3 deep and am having some trouble getting it to work. The control is a combo box and i cannot seem to trigger the...
2
by: IqbalEva | last post by:
I have a form and a subform. After updating one of the cboBox in the main form I would like the cboBox in the subform to filter out only the products from the supplier selected above. Currently the...
1
by: isoquin | last post by:
Hello- I have one form frmProject1 (record source tblProject1), with two subforms within it: 1) frmPayroll (tblPayroll), and 2) frmTimes (tblTimes) Basically, there are multiple different...
2
by: ChipR | last post by:
I'm suddenly having a major problem trying to switch between rows in a continuous form in Access 2007. The form represents a timesheet and has a row for each activity that an employee may work on. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.