Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Forums > Access
Back to Access Forum    Comments List
Count Records in SQL Listbox Upload Images   Link   Email  
Richard Lanoue 
In your search seminar, you explained a method where if the database came up with no results a msgbox appeared and said so.  Once the lessons shifted to SQL and listbox for displays, there was no method explained to trigger a msgbox to say "No Records Found".   I want to do this.  How is it done?
Richard Rost 
You could determine if there are no records with a DCOUNT call before running the SQL
Richard Rost 
Or you could also run the SQL and then use the ListBoxName.ListCount property to see how many items were loaded into it.
Richard Lanoue 
I am having difficulty using DCount
Richard Lanoue 
Used list count method... worked great! Thank you.  I don't suppose there is a method that can type the words "No Records found: in the list box is there?
Richard Rost 
A cheesy way would be to make a label that's normally invisible that sits on the same space, over the listbox. If there are no records just make that one visible:

If ListBox.ListCount < 1 then
  MyLabel.visible = true
else
  MyLabel.visible = false
end if

Of course the label's caption can say "No records found" and be colored and pretty. That's cheesy, but it's visually appealing and simple to do. Yeah, you can manually set a line item in the list yourself, but I like this solution better. :)
Richard Rost 
Hey John, would you do me a favor? I'm testing some thing one the site right now. Will you just let me know (either email me or post a comment here) if you get the EMAIL from my server that notifies you that I made this comment? Thanks.

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

 
 
 

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 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/28/2024 6:16:05 AM. PLT: 0s