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

Date Function question :)

P: 6
Hi, I am new to programming/coding, can someone please help me find the coding for the following question:

I have a table with a place to put in dates (Agreement Start Date).

I need a function to have a Notfication Message (like a warning box or save promp box) pop up 75 days after the given date (Start Date) prompting the user to check for something in the record. (i.e. to check to see if the client has paid yet.)

Can someone help me please, please :)

Much thanks in advance.
Dec 14 '07 #1
Share this Question
Share on Google+
11 Replies

Expert Mod 10K+
P: 12,389
There are many VBA tutorials out there. For example this one. Take a look at it, try it out and let us know if you have any questions.
Dec 14 '07 #2

P: 6
Thank you, I will do a thorough search and if I need more help I will notify, thanks again.
Dec 14 '07 #3

P: 6
Hello Rabbit, I checked everywhere, all I get is information on various MsgBoxes and their flags and captions.

After a thorough search throughout the internet I couldn't even find a sample code for what I am looking for.

Can you give me a push in the right direction with the correct code or whatnot?
Dec 17 '07 #4

Expert 2.5K+
P: 3,532
Is this form in Datasheet, Continuous or Single View?

Welcome to TheScripts!

Linq ;0)>
Dec 17 '07 #5

P: 6
Hi, thank you.

My form is not in continuous view, instead it is a Datasheet where by scrolling up or down (with the mouse scroll ball) the user can go from one record to another (I guess that is single view..??)

Thank you,

Dec 17 '07 #6

P: 6
I'm looking for something along the lines of:

If DateAdd("d",+70,[Agreement Start Date]) Then
MsgBox("Check to see if they have paid", vbInformation)


Private Sub Command232_Click()
If "Agreement Start Date" = [Now() + 70] Then MsgBox = ("Check to see if they have paid")
End Sub
Dec 17 '07 #7

P: 6
I would use the DateDiff function.

If DateDiff("d," date(),[Agreement Start Date]) >= 75 then
Enter your code
end if
Dec 17 '07 #8

Expert 2.5K+
P: 3,532
Datasheet view looks like an Excel spreadsheet. Continuous view looks similar, but you can do more things with it. Single view, whcih I'm guessing is what you mean, is when one record can be viewed at a time. The view makes a difference in how you do things like this.

Ray had the right idea, but he switched the two dates around; you'd have ended up with a negative number since the [Agreement Start Date] is always going to be in the past. You need to place this code in the On Current event like this:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.   If DateDiff("d", Me.[Agreement Start Date], Date) >= 75 Then
  3.   MsgBox "Has This Account Been Paid?"
  4.   End If
  5. End Sub
Linq ;0)>
Dec 17 '07 #9

P: 6
Thank you raybettoni and missinglinq.

Your sheer brilliance knows no bounds!!!!

(ps I'm working on a database projects up until the end of my contract which is Jan 10, 2008, I may have some more questions until then. I don't usually work on Database and/or Programming contracts, so this is a first for me.)

Thank you again!
Dec 18 '07 #10

Expert 2.5K+
P: 3,532
Glad we could help!

Linq ;0)>
Dec 18 '07 #11

P: 6
Glad we could help. I am a contrator also. MS Access developmet. There is a good market here in my home city of Pittsburgh for IT contractors. 7 years and I have only been out of work for more then one month once.
Dec 18 '07 #12

Post your reply

Sign in to post your reply or Sign up for a free account.