Hello
What I wanted was the ability to input a time on a form, and for a notification to come up at that time basically.
I created a query (Callbacks - Duedatetime) that checks the database where this is stored and returns the maximum (MaxofDue Date/Time) of any times within the past 15 minutes. The query works fine.
I then have a form (MaxofDueDate/Time), which outputs the result of the query in a text box (MaxofDue Date/Time).
I have a Macro on the Ontimer event, set to 15 minute intervals, that is as follows:
OpenForm:
Form Name MaxofDueDate/Time
View Form
Filter Name
Where Condition
Data Mode
Window Mode Hidden
If [Forms]![MaxofDueDate/Time]![MaxOfDue Date/Time] Is Not Null Then
MessageBox
Message ="One or more call-backs are due - please check these now."
Beep Yes
Type Information
Title Callback due.
Else
Close Window
Object Type Form
Object Name Max ofDueDate/Time
Save Prompt
End If
The problem is the messagebox is displayed every fifteen minutes without fail despite there not currently being anything in the textbox MaxofDue Date/Time!
Is there a better way around this? Sorry if I’ve made this very long winded and messy – it’s the only way I could think of doing it!!
Cheers for any help!
Jake.
What I wanted was the ability to input a time on a form, and for a notification to come up at that time basically.
I created a query (Callbacks - Duedatetime) that checks the database where this is stored and returns the maximum (MaxofDue Date/Time) of any times within the past 15 minutes. The query works fine.
I then have a form (MaxofDueDate/Time), which outputs the result of the query in a text box (MaxofDue Date/Time).
I have a Macro on the Ontimer event, set to 15 minute intervals, that is as follows:
OpenForm:
Form Name MaxofDueDate/Time
View Form
Filter Name
Where Condition
Data Mode
Window Mode Hidden
If [Forms]![MaxofDueDate/Time]![MaxOfDue Date/Time] Is Not Null Then
MessageBox
Message ="One or more call-backs are due - please check these now."
Beep Yes
Type Information
Title Callback due.
Else
Close Window
Object Type Form
Object Name Max ofDueDate/Time
Save Prompt
End If
The problem is the messagebox is displayed every fifteen minutes without fail despite there not currently being anything in the textbox MaxofDue Date/Time!
Is there a better way around this? Sorry if I’ve made this very long winded and messy – it’s the only way I could think of doing it!!
Cheers for any help!
Jake.