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
> Changes To Memo Field Not Being Recognized, Access 2010    
 
   
dwilson
post Oct 14 2018, 05:34 PM
Post#1



Posts: 68
Joined: 10-October 17



My form has several fields that must contain data. There is a "close" button that runs some VBA to check the fields and pops up a vbOKOnly msgbox identifying any required field that has a null value and exits the "close" subroutine. The user is returned to the form, where he or she adds missing data. When the "close" button is hit again, the code recognizes that the field is no longer null and the form closes.

Here's the weird thing: the code doesn't work with a memo field. If the user is returned to the form because the memo field is empty, then adds some data and hits the button again, the msgbox pops up again. If I step through the code, it shows the memo field as still having a null value even after text has been added.

So is there something about a memo field that keeps changes from being recognized without some additional specific code? If so, what code? would it be a refresh, a requery, or a dirty = false? Or something else entirely?
Go to the top of the page
 
DanielPineault
post Oct 14 2018, 05:48 PM
Post#2


UtterAccess VIP
Posts: 6,720
Joined: 30-June 11



We'd need to see your code or sample database to review.

--------------------
Daniel Pineault (2010-2019 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
dwilson
post Oct 14 2018, 05:51 PM
Post#3



Posts: 68
Joined: 10-October 17



It must be something do do with the way memo fields are handled by default. I added a form refresh to the lostfocus event of the memo field and the code works fine now.
This post has been edited by dwilson: Oct 14 2018, 05:52 PM
Go to the top of the page
 
DanielPineault
post Oct 14 2018, 05:58 PM
Post#4


UtterAccess VIP
Posts: 6,720
Joined: 30-June 11



Good to hear you got it sorted out.

--------------------
Daniel Pineault (2010-2019 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    21st July 2019 - 10:30 PM