Thanks to both Marshall and Linq. Moving the code to the after update event fixed the problem. Figuring out which event to use in a given situation is something that (obviously) I have some trouble with. I guess that's something that will come with more experience...
"Linq Adams via AccessMonster.com" wrote:
[Quoted Text] > Had your line > > Me.Location = Format(Me.Location, "00000") > > been in the proper event, you wouldn't have had this problem: > > Private Sub Location_AfterUpdate() > Me.Location = Format(Me.Location, "00000") > End Sub > > Besides the problem you've noted, with the code in the OnExit event, Access > would waste time re-formatting "Location" every time you exited the field, > which, as you've found out, is each time you move to a different record. > > -- > There's ALWAYS more than one way to skin a cat! > > Answers/posts based on Access 2000/2003 > > Message posted via AccessMonster.com > http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1> >
|