Computer Learning Zone CLZ Access Excel Word Windows

The purpose of education is to show people how to learn for themselves. The other part of it is that you need to reach that state of independence and self-reliance.

-Noam Chomsky
 
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Courses > Access > Seminars > Calendar > Calendar
Back to Calendar Seminar Lessons    Comments List
Upload Images   @Reply   Bookmark    Link   Email  
Calendar
Steven Verhaegen 
    
11 months ago
How can i replacede listboxes with subforms (Continuous form)
Sami Shamma  @Reply  
             
11 months ago
Subforms

create 42 Subforms with similar recordsource to the Listbox.

I have done this, and incorporated color coding and other features.
Steven Verhaegen OP  @Reply  
    
11 months ago
Simple as that? Can you give an example?
Sami Shamma  @Reply  
             
11 months ago
I will when I get to my other computer tomorrow evening.
Steven Verhaegen OP  @Reply  
    
11 months ago
OK, thx already.
Alex Hedley  @Reply  
            
11 months ago
Steven Verhaegen OP  @Reply  
    
11 months ago
Continuous forms, list box works, but i want to use subforms
Sami Shamma  @Reply  
             
11 months ago
you need Subforms to do conditional formatting.
Kevin Robertson  @Reply  
          
11 months ago
I did this last year. The subforms had no Recordsource.
I wrote the following sub to add the Recordsource to each subform dynamically.

Private Sub SetDay()

    Dim mySQL As String, whereStr As String, S As String, X As Long
    
    mySQL = "SELECT * FROM AppointmentQ WHERE "
    
    For X = 1 To 42
        S = "Day" & X
        whereStr = "DateTime>=#" & StartDate + (X - 1) & "# AND DateTime<#" & StartDate + X & "#"
        Me.Controls(S).Form.RecordSource = mySQL & whereStr
    Next
    
End Sub


I called this sub in the Load event of the Calendar Form.
Sami Shamma  @Reply  
             
11 months ago
Kevin,

I love this approach. it will make life easier.  I wish I knew how to this before a coded the 42 subforms.
Steven Verhaegen OP  @Reply  
    
11 months ago
So you can use the same subform everytime? -> i make a form as a Continuous form and copy it 42 times in the mainform and name them day1, day2 like the listboxes? (excuse me for my English, I'm Dutch (Flemish) speaking)
Kevin Robertson  @Reply  
          
11 months ago
This thread shows some of my screenshots for my calendar:
    Appointments Calendar

The last image shows the use of Subforms instead of Listboxes.
Steven Verhaegen OP  @Reply  
    
11 months ago
That's how i want it to be.
Steven Verhaegen OP  @Reply  
    
11 months ago
I'm doing something wrong with the where part.
Kevin Robertson  @Reply  
          
11 months ago
Please share what you have. We can't troubleshoot your problem if we can't see it. Saying that though, check your spacing. Missing just one space is enough to make the code not work.
Steven Verhaegen OP  @Reply  
    
10 months ago
My apologies for the late reply. But I was away on vacation. I got it working. So thanks to all for the help

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Calendar Seminar Lessons.
 

 
 
 

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 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/15/2025 5:21:58 AM. PLT: 2s