• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 399
  • Last Modified:

Update fields AfterUpdate not working automatically

I have several fields on my form that AfterUpdate 2 fields automatically get updated:
This one is for [Side]

Private Sub Side_AfterUpdate()
Me.SideUser = fn_get_user_name()
Me.SideStamp = Now
End Sub

On my form that I saved as a backup, these fields are updated automatically as soon as I update [Side].  The 2 controls are immediatly populated.

On a copy I made of a different form and made changes to I have the exact same code and it doesn't update the SideUser and SideStamp fields until I refresh the form or when I click in the User or Stamp fields.  

There is something in this form that is keeping the fields from updating the data as soon as a change is made.  The 2 forms are almost identical.

I put a me.refresh in but this causes a flicker I don't like.  

Private Sub Side_AfterUpdate()
Me.SideUser = fn_get_user_name()
Me.SideStamp = Now
Me.Refresh
End Sub

Any ideas?
0
Scotto123
Asked:
Scotto123
  • 4
  • 3
1 Solution
 
Jeffrey CoachmanMIS LiasonCommented:
<On a copy I made of a different form and made changes to...>

...and these changes were?...
0
 
mbizupCommented:
What fields do you have on this form other than Side, SideUser and SideStamp fields?

The After Update event will not run until you click out of the Side textbox.
0
 
Scotto123Author Commented:
Yeah, the changes don't take effect until I click on the boxes that are to be updated.  Even if I change records or fields, the change doesn't happen.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
mbizupCommented:
Are you able to post a sanitized sample of your database demonstrating this?

Not that I'm questioning it, of course ;-)   It just seems unusual enough (I don't think I could recreate that issue) that actually seeing it might help.
0
 
mbizupCommented:
Just for kicks, before doing that click the "..." next to After Update in the textbox's property sheet, to ensure that the event is 'connected' to the code.
0
 
Scotto123Author Commented:
Copy Of WhiteBoard_Audit works - auto refreshes

WhiteBoard_Audit doesn't update when changes are made.
RADONC-Error.accdb
0
 
mbizupCommented:
It looks like your textboxes for SideUser and SideStamp are not properly named -- they have the default names like text1546 and text1641.

Your code is updating the underlying field, but it is not reflected in the textboxes.

Try renaming the textboxes as SideUser and SideStamp.
0
 
Scotto123Author Commented:
Oh.  That's the answer I was looking for!  I copied the boxes into the form and it didn't keep the names.  

Thanks Biz!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now