Computer Learning Zone CLZ Access Excel Word Windows

The learning process continues until the day you die

-Kirk Douglas
 
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  
Month Name
Ewa Gustafsson 
     
6 months ago
In Calendar seminar we create the button +1 Month, is it possible to display the name of the month in a text box, label or similar?
Adam Schwanz  @Reply  
            
6 months ago
You mean to figure out what month +1Month would move to?
Ewa Gustafsson OP  @Reply  
     
6 months ago
Yes, that's exactly what I mean. Because if I know what the next month is, I can also take the previous month. Attaches picture
Ewa Gustafsson OP  @Reply  
     
6 months ago

Adam Schwanz  @Reply  
            
6 months ago
Something like this would give you last months name, the current month, and next months name. Just change the Date() field to the date field that sets your current month.

    MsgBox MonthName(Month(DateAdd("m", -1, Date)))
    MsgBox MonthName(Month(Date))
    MsgBox MonthName(Month(DateAdd("m", 1, Date)))
Ewa Gustafsson OP  @Reply  
     
6 months ago
Can I use a Dropdown Box to select Current Month from and return the Previous Month and Next Month values ​​in the text boxes?
Ewa Gustafsson OP  @Reply  
     
6 months ago
(Don't know where this came from​​)
Can I use a Dropdown Box to select Current Month from and return the PreviousMonth and NextMonth values in textboxes
Adam Schwanz  @Reply  
            
6 months ago
Sure, you should already have a date field somewhere though that sets up your calendar. That would probably be the easiest.

But if you want a combo box to select a month, you might need a little more vba to create a date field out of a combo box. The easiest way would probably be to store the month number inside the combo box along with the month name, so you wouldn't need to figure that out.
Ewa Gustafsson OP  @Reply  
     
6 months ago
Do you think that is too difficult for me to understand?
Sounds like a good idea to store the month number inside the combo box along with the month name.
But it sounds exciting with VBA programming.
Adam Schwanz  @Reply  
            
6 months ago
No but I mean if you already have the date field, you could just automatically populate the previous and next months names onto the buttons and just put it into your current coding for +1Month etc. It's a lot simpler and streamlined.

If you want to do a combo box though, make it 2 columns, with a row source like this.. Bound column 1
1;"January";2;"February";3;"March";4;"April";5;"May";6;"June";7;"July";8;"August";9;"September";10;"October";11;"November";12;"December"
You can set the width of the first column to 0 so you only see month names.

Then you can just do textboxes with control sources like
=IIf([MyCombo]=12,"January",MonthName([MyCombo]+1)) 'for next month
=IIf([MyCombo]=1,"December",MonthName([MyCombo]-1)) 'for prev month
Kevin Robertson  @Reply  
           
6 months ago
I usually use a For Next Loop to add months to a Combo Box.

    Dim X As Long, S As String

    For X = 1 To 12
        S = X & ";" & MonthName(X)
        cboMonth.AddItem (S)
    Next
Alex Hedley  @Reply  
            
6 months ago
Glossary: MonthName

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/17/2025 10:26:19 AM. PLT: 2s