Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Toggle Between Null and -1

2 views
Skip to first unread message

croy

unread,
May 5, 2015, 3:37:42 PM5/5/15
to
In a textbox, I have a KeyDown event to enter -1 in another
textbox. It works fine, but... It would be very convenient
to have it toggle between null and -1.

In the KeyDown event code for the NumPad 0 key, I added:

If IsNull(Me!txtVO) then
Me!txtVO = -1
Me.Dirty = False
ElseIf Me!txtVO = -1 then
me!txtVO = Null
End If

... it puts the -1 in if it's null to start with, but it
doesn't toggle back to null if it's -1 to start with.

Thoughts?

--
croy
0 new messages