A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Want to open a form on the first work day of the month



 
 
Thread Tools Display Modes
  #1  
Old October 9th, 2009, 06:09 PM posted to microsoft.public.access.forms
David McLean
external usenet poster
 
Posts: 15
Default Want to open a form on the first work day of the month

Hi there.

I've got a problem and unfortunately I don't have any clue where to START a
solution. I've got a form (frmAutoNotify) that I would like to open
automatically when the database is opened on the first work day of every
month. The form basically has a couple of queries on it that show the user
where gaps in the data for the last month are so they can make sure that all
data entry is complete.

I'm thinking I'm probably going to need a table that lists all of the
non-work days each year (including weekends? not sure if access can figure
this out automatically), but other than that I've no clue what i need to do.

If anyone could give me some advice, I would greatly appreciate it!
Thanks!
--
David McLean



  #2  
Old October 9th, 2009, 06:57 PM posted to microsoft.public.access.forms
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Want to open a form on the first work day of the month

"David McLean" wrote in message
...
Hi there.

I've got a problem and unfortunately I don't have any clue where to START
a solution. I've got a form (frmAutoNotify) that I would like to open
automatically when the database is opened on the first work day of every
month. The form basically has a couple of queries on it that show the user
where gaps in the data for the last month are so they can make sure that
all data entry is complete.

I'm thinking I'm probably going to need a table that lists all of the
non-work days each year (including weekends? not sure if access can figure
this out automatically), but other than that I've no clue what i need to
do.



The workday math functions posted he

http://www.mvps.org/access/datetime/date0012.htm
Date/Time: Doing WorkDay Math in VBA

.... include a function to determine what is the first workday of any given
month. With that code in your database, you can tell whether today is the
first workday in the month using a test like this:

If Date() = dhFirstWorkdayInMonthA() Then
' Today is the first workday in the month.
End If

If you want to take holidays into account, you do have to include a table or
array of holdays.

Now, even with that problem out of the way, you still need to address a
couple of questions:

1. Can you ensure that the database will in fact be opened every workday?

2. If the database wasn't opened on the first workday of the month, what do
you want to do? Do you want to open your form the first time the database
is opened during a month, even if that is not the first workday?

3. If the database is opened more than once on the target day, do you want
to open the form each time? Or only the first time the database is opened
that day? Or would you want the user to make a decision about that -- a
"Don't show this again until next month" option?

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:08 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.