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 Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Make Field Not Visible
Thomas Corbett 
     
6 years ago
I have a form with a series of date fields. One field is the current date. Another is the date an event is opened. The third is a field called current running days (current dat - date an event is opened. In Vb I am trying to make the current running days field turn to not visible when the date and event is closed field is populated.

Currently this is the code that runs when a change occurs to the date and event is closed field is populated

Private Sub Current_Running_Days_Change()

If IsNull(Me.date and event is closed) = False Or Me.date and event is closed = "" Then

Me.Current_Running_Days.Visible = True

Else

Me.Current_Running_Days.Visible = False


End Sub

Thanks -

Richard Rost  @Reply  
           
6 years ago
I need some clarification. What is "EventIsClosed"? Is that a date field or a y/n field? I would recommend using a y/n field because then you could just say:

if EventIsClosed then
   Field.Visible = FALSE
else
   Field.Visible = TRUE
end if


Otherwise if it's a date field, then you could say:

If IsNull(EventIsClosed) then
  ...


You've got multiple fields inside your IsNull function, and you've got spaces in your "event is closed" field, which if that's the case means you need to enclose it in brackets like [event is closed].

I'd recommend taking Access Developer 1 to get some intro to VBA programming.
Richard Rost  @Reply  
           
6 years ago
Also, Me.Date isn't a valid field. Date is a reserved word. By itself it will return today's date, and you don't put Me in front of it. If you did make a mistake and create a field called Date, then you'd need to refer to it as [Date] or Me.[Date] so Access knows you mean the field and not the function.
Richard Rost  @Reply  
           
6 years ago
Also, if [event is closed] is a date field, then you don't compare it to an empty string. It will never be "". It will either have a date value in it or NULL.
Richard Rost  @Reply  
           
6 years ago
I'm sending you free copies of Developer 1 and 2. Watch them before you continue on with your programming. You're missing some fundamentals that you really need. I can tell you're trying to learn by trial and error, and that is definitely praiseworthy, but this will help you get the basics down.
Thomas Corbett OP  @Reply  
     
6 years ago
Thank you so Much!!! I really love your courses and teaching style!!!
Richard Rost  @Reply  
           
6 years ago
Thanks, Thomas. Enjoy!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access 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/6/2026 1:29:52 PM. PLT: 1s