UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Date event alarm, Office 2007    
 
   
AlipioSequeira
post Aug 26 2010, 10:28 AM
Post #1

UtterAccess Addict
Posts: 235
From: Coimbra - Portugal



Hello to all UA members.

I post here because i think is the correct discussion forum.
I have this table to register events related to car maintenance events.
I have a scheduled date field and a executed date field.
what I need to do is create a pop up form that prompts an alarm containing basic information to a given event(record) based on the scheduled date time field

I have a query set up with car; license number; scheduled date and event type (repair; inspection; insurance payment day; other) and memo field notes.
I have a form to this query, how can I have it pop up and play a sound warning to an event;

anyone?
Thanks very much for your time and knowledge.

Greetings from Portugal
AlípioSequeira
Go to the top of the page
 
+
theDBguy
post Aug 26 2010, 10:57 AM
Post #2

Access Wiki and Forums Moderator
Posts: 48,113
From: SoCal, USA



Hi,

When do you want the form to pop up?
Go to the top of the page
 
+
AlipioSequeira
post Aug 26 2010, 12:08 PM
Post #3

UtterAccess Addict
Posts: 235
From: Coimbra - Portugal



Hello and thanks for your interest

I pretend the alarm to play the day before and actual event day ( two occurrences )

greetings
AlípioSequeira
Go to the top of the page
 
+
theDBguy
post Aug 26 2010, 12:37 PM
Post #4

Access Wiki and Forums Moderator
Posts: 48,113
From: SoCal, USA



Thanks. Will the database be open all the time so it can continually query if it needs to pop up the form?

If not, then the next best thing would be to have Access check the query each time you run the database and then call the pop up form when there's an event tomorrow or today.

Just my 2 cents...

This post has been edited by theDBguy: Aug 26 2010, 12:39 PM
Go to the top of the page
 
+
AlipioSequeira
post Sep 1 2010, 05:10 AM
Post #5

UtterAccess Addict
Posts: 235
From: Coimbra - Portugal



Hello again.
Well the DB is mostly running all day. Is meant to manage all training courses and students and teachers and other stuff you can relate to training.
I'm hoping to apply it to a trucking fleet and cargo management I'm trying to build as well.

Thanks for posting.
Greetings from Portugal
AS
Go to the top of the page
 
+
theDBguy
post Sep 1 2010, 09:50 PM
Post #6

Access Wiki and Forums Moderator
Posts: 48,113
From: SoCal, USA



Hi,

I would say you could try something like this:

1. Create a query based on your table and include all the fields you would like to see including the date.
2. Add a calculated column with the following expression:

DaysTillDue: DateDiff("d", Date(), [DateField])

3. In the criteria row for this new column, enter the following:

Between 0 And 1

4. You can uncheck the Show box to hide the column (unless you want to see it).
5. Then, create a form based on that query. This will be the form you will popup.
6. Now, create another form that will stay open but hidden from view at all times.
7. In the TimerInterval property of this form, enter:

3600000

8. In the On Timer event, select the following from the dropdown:

[Event Procedure]

9. Next, click on the three dots next to it:
10. In the code window that opens, type the following between the Private Sub and End Sub area:

If DCount("*", "QueryName") > 0 Then
DoCmd.OpenForm "FormName"
End If

Replace "FormName" above with the name of the form based on the query you created above.

11. At the statup of your database, make sure the second form (the one with the timer) is opened but you can hide it, and keep it open.

Let me know if you have any questions. We can also refine the process later such as adding a message box to confirm before the form.

Hope that helps...
Go to the top of the page
 
+
AlipioSequeira
post Sep 13 2010, 05:24 AM
Post #7

UtterAccess Addict
Posts: 235
From: Coimbra - Portugal



Hello again.

Thanks for your interest and help.
As I'm not a DB programmer in full time I'll get back to it as soon as I can.

once again.
My thanks and greetings from Portugal

AlípioSequeira
Go to the top of the page
 
+
theDBguy
post Sep 14 2010, 12:05 AM
Post #8

Access Wiki and Forums Moderator
Posts: 48,113
From: SoCal, USA



Hi,

(IMG:style_emoticons/default/yw.gif)

Let us know if you get stuck...
Go to the top of the page
 
+
AlipioSequeira
post Jan 24 2011, 01:19 PM
Post #9

UtterAccess Addict
Posts: 235
From: Coimbra - Portugal



Hello DBGuy!
Thanks for your post, once again.
Today I got to do as you explained, but can't quite figure it out how to load two forms on DB opening and make the form not visible.
I dis as you explained.
the query is "aniversarios"
the form to popup is "aniversarios" also
and the supposed invisible form is clientes1

the DOB field is part of "ENTIDADES" table but in the form the label is Dnascimento and is visible only in the "ENTIDADES" form.

I attached the DB so you can see what I've done so far and give me some feed back.

Greetings from portugal.
Thanks again.
Alípio Sequeira
Attached File(s)
Attached File  verdeagua.zip ( 1.68MB ) Number of downloads: 16
 
Go to the top of the page
 
+
jmcwk
post Jan 24 2011, 05:53 PM
Post #10

UtterAccess VIP
Posts: 12,201
From: Tacoma, WA.



Alípio,

Basically did what DB suggested with the exception of adding the code in the On Load Event of the Switchboard. Not too sure this is what you need however give it a try and let us know.


Attached File(s)
Attached File  verdeagua__2_.zip ( 1.87MB ) Number of downloads: 29
 
Go to the top of the page
 
+
AlipioSequeira
post Jan 25 2011, 07:56 AM
Post #11

UtterAccess Addict
Posts: 235
From: Coimbra - Portugal



jmcwk, Thanks for your help.

the form is working but i'd like tu understand what is going on here.
can you tell me what is the role for the clientes1 form???
I had the query returning DOBs up to 8 days beefore the date event and is working fine.

Thanks again
Greetings from Portugal
Alípio Sequeira
Go to the top of the page
 
+
jmcwk
post Jan 25 2011, 09:48 AM
Post #12

UtterAccess VIP
Posts: 12,201
From: Tacoma, WA.



Alipio,

QUOTE (AlipioSequeira @ Jan 25 2011, 01:56 PM) *
the form is working but i'd like tu understand what is going on here.
can you tell me what is the role for the clientes1 form???
I had the query returning DOBs up to 8 days beefore the date event and is working fine.


As far as I can tell the Clientes1 form has no role at all and can be deleted. As far as how it works the below code is placed in the On Load Event of your Switchboard and fires on loading If DOB fall within the set parameters you have established Anivrsarios opens, otherwise your switchboard opens. The Docmd.Minimize minimizes the switchboard and opens Aniversarios. In the on Close event of Aniversarios Switchboard is reopened. Is that all you needed to know ?

CODE
Private Sub Form_Load()
If DCount("*", "Aniversarios") > 0 Then
DoCmd.Minimize
DoCmd.OpenForm "aniversarios"
End If
End Sub
Go to the top of the page
 
+
AlipioSequeira
post Jan 26 2011, 04:58 AM
Post #13

UtterAccess Addict
Posts: 235
From: Coimbra - Portugal



Hello John.
Many thanks for your help and theDBGuy, this was very helpful.
getting the job working was great, but understanding how it works I think is much better because now i can make it work for any events date related or not.

may many thanks again.
Hope to help you guys any day (IMG:style_emoticons/default/smile.gif) too!
Alípio Sequeira
Go to the top of the page
 
+
jmcwk
post Jan 26 2011, 12:05 PM
Post #14

UtterAccess VIP
Posts: 12,201
From: Tacoma, WA.



Alípio,

Your quite Welcome , DB and I were glad to help

Good Luck with your Project (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
 
+
theDBguy
post Jan 26 2011, 12:18 PM
Post #15

Access Wiki and Forums Moderator
Posts: 48,113
From: SoCal, USA



Thanks for the assist, John. (IMG:style_emoticons/default/cheers.gif)
Go to the top of the page
 
+
jmcwk
post Jan 26 2011, 01:00 PM
Post #16

UtterAccess VIP
Posts: 12,201
From: Tacoma, WA.



You Betcha !
Go to the top of the page
 
+
joe8915
post Mar 23 2011, 08:12 AM
Post #17

UtterAccess Member
Posts: 47



First time post here. I found this topic and its what I like to do as well. but with a twist

Running ms 2007
Split db
SQL in BE
db is secure (user must log in to access the db)
I would like the form to pop up when a date criteria is met
user will have the option to complete or extend to the snooze date, then when snooze date arrrives the pop up form fires again when log in again with in that date range.

I will attach the db

I have had this idea for a few years and tried many times but never got it to work.

Thanks for ANY help
Joe




Attached File(s)
Attached File  DBAlarm.zip ( 35.62K ) Number of downloads: 10
 
Go to the top of the page
 
+
theDBguy
post Mar 23 2011, 04:57 PM
Post #18

Access Wiki and Forums Moderator
Posts: 48,113
From: SoCal, USA



Hi Joe,

(IMG:style_emoticons/default/welcome2UA.gif)

Maybe this will give you some ideas.

Hope that helps...

Attached File(s)
Attached File  DBAlarm.zip ( 22.77K ) Number of downloads: 24
 
Go to the top of the page
 
+
joe8915
post Mar 24 2011, 08:41 AM
Post #19

UtterAccess Member
Posts: 47



Many thanks for the quick reply. It works great. Let me understand this, the form will only fire when the criteria are met in the query.

Little confused on the timer event. (IMG:style_emoticons/default/iconfused.gif)
Go to the top of the page
 
+
theDBguy
post Mar 24 2011, 01:07 PM
Post #20

Access Wiki and Forums Moderator
Posts: 48,113
From: SoCal, USA



Hi,

I think your requirement is a little different. Since you only want the user to be notified after they log in, I didn't have to use any Timer event.

And yes, the popup form will only open when there is at least one record in the query.

Good luck!
Go to the top of the page
 
+

2 Pages V   1 2 >
Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 01:14 PM

Tag cloud: