Automatic Weekday Population on Form

applecake

New member
Local time
Today, 02:20
Joined
Feb 22, 2007
Messages
6
Hello all, I'm currently designing a form to generate a series of reports and require the form to list Previous Business Day, Current Business Day, Next Business Day, and 2 business days forward in separate text boxes.

The current business day part is obviously simple but I'm struggling with the other fields as I'm not much of a VBA expert (and trying to use an iif statement in SetValue in the macro wizard didn't work).

I'm not concerned about the days falling on holidays, just can't have them fall on a weekend (Sat/Sun).

Thanks for any help you can provide.
 
applecake,

Take a look at the attached and zipped demo Access file. It does exactly what you want. It uses VBA code and not macros.

Just FYI, the power of Access to build applications and to accomplish tasks is in VBA not in macros.

As you have questions, post back and we will try to help.
 

Attachments

Thank you Mr. B.

This worked perfectly for me. You must be a mind-reader because the txtCalcDate field that you included was going to be my next project.

Thanks again!
 
You are quite welcome and No I am not a mind reader.

That was just the only way that I could provide you with the ability to check the calculations. Although I knew that I had tested them here, it never hurts to provide ways that users can also do the checking.

Good luck with you project.
 

Users who are viewing this thread

Back
Top Bottom