[AccessD] Locking a textbox based on other form controls

Christopher Jeris cjeris at fas.harvard.edu
Thu Aug 17 11:18:35 CDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Charlotte Foust wrote:
> The Change event happens on every keystroke, including the first one.
> Type "a" and that's a change and you're trying to lock the control you
> just typed an "a" into without leaving the control and committing the
> value.  That's what the message means.  I think you want the afterupdate
> event of the control, not the change event.

But that's not what I wrote, and not the problem.

If I were trying to lock Text2 when I typed into Text2, the message would
make perfect sense.

In fact, when I type into Text2, I'm trying to lock the OTHER box, Text0:

  ' The function of Text2 is that when it is changed, Text0 is locked:
  Private Sub Text2_Change()
      Me![Text0].Locked = True
  End Sub

This is exactly why I'm so confused.  When the complaint comes up, "You
can't lock a control while it has unsaved changes", the control I'm trying
to lock has _never_been_changed_.

It's possible the AfterUpdate event is what I want, but I'd still like to
figure out what's going on here.

thanks, Chris Jeris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFE5Jba5ICCNV0oGWARAjLeAJ0R+LbbUF7K+8n118rsUY1VNBZQlgCfQq9g
yzPWdkBGLW6kdjygZXWFOMk=
=+r0f
-----END PGP SIGNATURE-----



More information about the AccessD mailing list