Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

message box or beep sound notification on basis of dates

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have to deposit my sale tax quarterly .I want that one week before the required date access warn me that on this date you have to deposit your bill and this message i will see everyday till that date whenever i open access daily in the morning.
 
Create a public function and attach it to the On Open of your first form, or in an AutoExec macro.

Something like this should work (changing the appropriate fields of course):

==========
Public Sub PayTaxes()
Dim paydate as Date, start as Date, finish as Date
start = Date()-8
finish = Date()+1
paydate = DLookUp("YourDateField", "YourTableName", "WhereCriteria")

If paydate > start AND paydate < finish Then
MsgBox &quot;You need to pay your taxes&quot;
End If
End Sub
==========

Now OnOpen of your first form put this:

Call PayTaxes Jim Lunde
compugeeks@hotmail.com
Custom Application Development
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top