By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,121 Members | 1,782 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,121 IT Pros & Developers. It's quick & easy.

Automatic Monthly Counter

P: n/a
G
I would like to know how to set up a counter that counts entries (being
entered by data operators) at the beginning of every month (text box would
show the counter in a form) and when it reaches 85 a warning message comes
up to signify the reached number. A user has to acknowledge the messages by
ie. pressing OK on the dialogue box to get rid off the message.
Then when the beginning of the next month starts, so does the counter again
automatically.

Can someone help me set up a query for this.
cheers.
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Fri, 17 Oct 2003 19:20:44 +1000, "G" <sk**@optusnet.com.au> wrote:

Off the top of my head, I would count the number of records in the
table for this month:

dim intCount as integer
intCount = DCount("MyPrimaryKeyField", "MyTable",
"DatePart('m',MyDateField) = Month(Date)")
if intCount >= 85 then
Msgbox "Warning: At least 85 units for this month.", vbInformation
end if

Depending on exact situation, this code would likely go in the
Form_Current event.

-Tom.

I would like to know how to set up a counter that counts entries (being
entered by data operators) at the beginning of every month (text box would
show the counter in a form) and when it reaches 85 a warning message comes
up to signify the reached number. A user has to acknowledge the messages by
ie. pressing OK on the dialogue box to get rid off the message.
Then when the beginning of the next month starts, so does the counter again
automatically.

Can someone help me set up a query for this.
cheers.


Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.