Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Text Returning Null
Brian Crawford 
    
4 years ago
I have a Sub that is called within a OnChange event for a TextBox.  Its purpose is to capture characters typed to build a SQL string on the fly to limit a ListBox.  I have an if statement that WAS working and now no longer does.  

What is strange is that in the debugger, if I use the immediate window to print the value of each variable and the right side of the equation, I get the results I expect, but the WhereStr variable here evaluates Me.SearchBranchTxt.Txt as Null even though ?Me.SearchBranchTxt.Txt returns "US", which is what I typed.
Brian Crawford OP  @Reply  
    
4 years ago

Richard Rost  @Reply  
          
4 years ago
What do you get if you MsgBox your whole SQL string? Did you Compile the code?
Brian Crawford OP  @Reply  
    
4 years ago
My bad... I tested this successfully with one ListBox then started another and got an error.  I didn't delete ALL the code for the second TextBox (which IS Null) and (what's left of that code) overwrote WhereStr in the line before the last End If.  The Indent makes it hard to see at a glance.  oops!
Richard Rost  @Reply  
          
4 years ago
That'll do it. :)

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/7/2026 7:13:40 PM. PLT: 0s