Date Function (1 Viewer)

HandSam

Registered User.
Local time
Today, 09:35
Joined
May 18, 2012
Messages
48
I am making a rent system, that has to track time so that every month it will set rent values to all tenants.
I am unable to make the system recognize a month change. ie if I tell the system,
if currentmth = currentmth+1 do the following......
it will not work because time changes.
How can I make the system know that this is now May or June etc.:confused:
 

Lehti

New member
Local time
Today, 18:35
Joined
Apr 27, 2013
Messages
5
Why don't you use the datediff function? I think it should work.
Search "DateDiff function VBA" on google. Unfortunately, I'm not able to link it directly to you, because of my post count.
 

Brianwarnock

Retired
Local time
Today, 17:35
Joined
Jun 2, 2003
Messages
12,701
:confused:
How can currentmonth ever equal currentmonth+1

Month(Date()) will give you the current month, but you will have to supply more information on what you are actually doing for further help.

Brian
 

RainLover

VIP From a land downunder
Local time
Tomorrow, 02:35
Joined
Jan 5, 2009
Messages
5,041
If you go to Access Help you will find "Date()" This tells you what today's Date is.

Then if you look at DatePart It will tell you the Month, or if you prefer the Year or Day.

This should at least point you in the right direction. I hope.
 

jdraw

Super Moderator
Staff member
Local time
Today, 12:35
Joined
Jan 23, 2006
Messages
15,393
In addition to the comments from others, I recommend you write down a description of your proposed "rent system" that identifies the things that are important to that system.
You haven't told us much, and you seem to be confused with "the nitty gritty" that I would call -- the implementation (Access) side of things. Do you have a list of the tables or subject involved? Do you have any idea of the order/timing of "events" that will influence your "system"?

This surrounding info would be helpful to readers.
Good luck.
 

Users who are viewing this thread

Top Bottom