UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Checking Control For Valid Value, Access 2010    
 
   
SemiAuto40
post Aug 10 2018, 04:46 PM
Post#1



Posts: 640
Joined: 3-April 12
From: L.A. (lower Alabama)


I'm trying to test a text control for a valid value. I don't want to use the form before update because it is most useful for me to execute code before allowing the user to go further in the form. Trouble is if I use before update or after update and the default existing value is in the field is just entered through with Return - it does not fire and my box doesn't get checked. If I do on Exit event it covers if update or not updated and entered through.... but I can't get a 'Cancel' button to work because I can't leave the text field because of the on Exit event won't let me leave when there is an invalid value. How does one do what I'm trying to do? I see the same problem with not being able to operate a 'Cancel' button on the Lost Focus event too.

Thanks in advance.
Go to the top of the page
 
GroverParkGeorge
post Aug 10 2018, 04:57 PM
Post#2


UA Admin
Posts: 33,736
Joined: 20-June 02
From: Newcastle, WA


I suggest you use the Before Update event of the control.

Check the .Text property of that control, not its .Value property.
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    15th October 2018 - 04:35 AM