Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
Access Database Msg Box
Alex Hedley 
           
15 years ago
Hi Mary,

As Richard has said, I'd create a query first,
If I understand your question correctly I'd create a new query using the InvoiceT, filter it with IsPaid = False and the Invoice date given the overdue criteria.

Then with your OnClick event:

    Dim overdue
    overdue = Nz(DLookup("FIELD", "QUERYNAME", "CustomerID=" & Forms![CustomerF]!CustomerID), 0)
    
    Change [this] to the form you are showing the message on
    -> Forms![CustomerF]!CustomerID

    I've wrapped the Dlookup in an Nz or Null Zero so if there isn't an overdue payment you can return any value, I've used 0 so now I can check for this below.

    'If it's not zero then there must be an overdue
    'payment so make the overdue label visible
    If overdue <> 0 Then
        OverdueLbl.Visible = True
    'If not make the label Invisible again
    Else
        OverdueLbl.Visible = False
    End If

"OverdueLbl" is name of the OVERDUE label Richard suggested you added in big red letters on the form. Rename this if necessary.

Regards
Alex


Reply from Richard Rost:

Looks good to me. A+  :)

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

Next Unseen

 
 
What's This?

 

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: 11/14/2026 11:26:42 PM. PLT: 0s