[AccessD] textbox value is null

Guss Ginsburg guss at beechnutconsulting.com
Fri Dec 23 14:46:15 CST 2011


John,

I usually accomplish this by using the AfterUpdate event.  If the entry is
bound to a field then you may want to do validation testing on the entry
(such as "is it null?", etc) in the before update event.  Once validated,
the after update event can populate the derived value into txtB.


Sincerely yours,
 
Guss Ginsburg
Beechnut Consulting Services



-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Friday, December 23, 2011 2:31 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] textbox value is null

I am trying to use the value of a text box I am typing into to create a
string in another text box. 
  IOW I type 'a' in txt1 and txt2 is set to 'C:\Access\a\'.  The C:\Access
is a constant directory location and I am inserting 'C:\Access\' &
txtA.Value & '\' into txtB.

However txtA.Value is NULL! until I move out of the text box (after update)
so the string I am building looks like 'C:\Access\\' since a null is being
inserted between the 'C:\Access\' and the '\'.  I thought I was going to use
txtA.OnKeyDown etc.  No dice.  I never really knew about this behavior and
don't quite know how to work around it.

Any thoughts?

--
John W. Colby
Colby Consulting

Reality is what refuses to go away
when you do not believe in it

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list