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 
Calendar Function Repeat Event
Jan 

16 years ago
Thanks for the reply it is not quite what I needed.
I need the functions or code that would help identify the Second Wednesday of every month between the start date eg 1/1/2010 and end date eg 12/31/10


Answer from Richard Rost:

Oh… well that's getting a lot more complicated. :)

You can use the WEEKDAY function to determine what day of the week a particular date is. You'd have to enclose that inside of a loop to check for the 2nd Wednesday - along with a counter to count the number of Wednesdays. Something like this:

D = InputBox ("Enter start date")
NumWed = 0
While NumWed < 2
   If WeekDay(D) = 4 then ' Wed
      NumWed = NumWed + 1
   End If
   D = D + 1
Wend

Now when this loop exits, you've got the 2nd Wednesday of that month in the value D.

You could take this and create a function out of it, and then wrap this inside something like that first bit of code I gave you to add the dates to your subform.

Again, not exactly EASY to do, but it's not terribly hard either IF you have the right VB background.

I hope this helps get you started in the right direction.

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/22/2026 3:48:43 PM. PLT: 1s