473,472 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to set an alert pop up window via a follow up date field?

Fspinelli
85 New Member
Good morning!

I have a follow up date field in a table/query...

Not a parameter query (I can do a that but that's for something else). This would run based on that one field with the follow up date in it. So if today is in the follow up date field then a message (preferably a report) would open up when the Switchboard (form) is opened.

Thank you!

Kind regards,
Faith
Nov 1 '10 #1

✓ answered by gnawoncents

If I understand what you're trying to do, then adding some code to the on open event of the form should do the trick. Consider the following:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2.  
  3. If [follow up date] = Date Then
  4.     DoCmd.OpenReport "YourReportName", acViewPreview
  5. End If
  6.  
  7. End Sub

12 3262
gnawoncents
214 New Member
If I understand what you're trying to do, then adding some code to the on open event of the form should do the trick. Consider the following:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2.  
  3. If [follow up date] = Date Then
  4.     DoCmd.OpenReport "YourReportName", acViewPreview
  5. End If
  6.  
  7. End Sub
Nov 1 '10 #2
Fspinelli
85 New Member
That's great, thank you gnawoncents!

Here's more that I realize I neglected to place in my query on Bytes...

There are two tables - Contacts and Calls. Calls and Contacts are related by [RecId] (if that's any help).

The calls table has the [FollowUp] date in it. Calls and Contacts are joined in a query "qrySearch".

Thank you for the assistance!

Kind regards,
Faith
Nov 2 '10 #3
gnawoncents
214 New Member
Faith,

I'm glad to help. I see you gave some more info, is it working for you now, or do you need further assistance refining the code based on your data? Let us know and we'll be glad to help.
Nov 2 '10 #4
Fspinelli
85 New Member
Good morning!

No it's not working for me. "Calls" is a subform in "Contacts" and the field [FollowUp] is in "Calls".

I have something going on upon start up now and under that code I placed the code you helped me with (I modified):

If [FollowUp] = Date Then
DoCmd.OpenReport "FollowUpReport", acViewPreview
End If

Q:
Do I need to reference the table "Calls" before [FollowUp]? And if so (or not so) how?

Thank you very much!

Kind regards,
Faith
Nov 3 '10 #5
gnawoncents
214 New Member
Faith,

Here are my assumptions, please correct me where wrong:

1) Calls displays single form view
2) You have some filter set so the Calls subform opens to the record you want when Contacts opens
3) You want the notification report to pop up when Contacts first opens, based on the record displayed in Calls

If this is correct, you should be able to use your code (as typed below) in the on open event of the Calls subform. **Make sure it is not in the Contacts on open event**

Expand|Select|Wrap|Line Numbers
  1. If [FollowUp] = Date Then
  2. DoCmd.OpenReport "FollowUpReport", acViewPreview
  3. End If 
If it still isn't working, or any of my assumptions are incorrect, please let me know.
Nov 4 '10 #6
Fspinelli
85 New Member
ok, let me try to confuse you more (i seem to be good with that)

I have a form called Switchboard. From that switchboard the end user can open up various other forms. What I want to do is when they open up the application, the Switchboard will be the first thing they see.

On the Switchboard I would like to place a subform showing which contacts the end user is supposed to call today (the day they open up the application).

Now, I have two tables called Calls and Contacts. They are related by their record ID numbers. Each contact has an ID number. The Contacts form is in three tabs, one of the tabs is Calls.

That Calls tab has a subform of the Calls table based on that contacts ID. There is a field where the end user will enter a date to follow up with this particular contact (later date). The [FollowUp] field is the date field they enter their follow up date in.

Every day when they open up the application (and get that Switchboard) they want a pop up reminder telling them they need to call whoever (some info shows) and then they can click and open the record up showing the Contacts form now open reflecting the Contacts data.

I have a query with the fields I want to show up. In the [FollowUp]I tried using in the criteria area "=date()". I have a few records with today's date in it to see if the query would work. It's not. I do have at least four records in there with 11/4/2010 in the FollowUp field but the query isn't pulling them up.

My main issue is creating a query to pull up one specific date. Yes, I'll have a parameter query in case the end user wants to print a report of calls to make for the week, but they want a pop up (or whatever) reminder for that day when they first log into the Switchboard.

I just don't know how to make the query run off of today's date. If I can at least learn how to make it do that then I can probably figure out how to then the rest should be easy (creating a report to print, etc.)

Know what I mean??

Thank you very much for your time and assistance!!!!
Nov 4 '10 #7
gnawoncents
214 New Member
The query criteria =Date() should be working. Copy it as SQL and paste it so I can see what might be happening. For the popup, it sounds like you might want to create a recordset or update a table based on the calls for follow-up that day to allow the end users to select on them individually. Anyway, please pass me the query's SQL and we'll go from there. Thanks!
Nov 4 '10 #8
Fspinelli
85 New Member
This is my query's SQL:

SELECT Calls.FollowUp, Contacts.Company, Contacts.FirstName, Contacts.LastName, Contacts.Title, Contacts.Phone, Contacts.WorkExtension, Contacts.MobilePhone, Contacts.Fax, Contacts.Email
FROM Calls INNER JOIN Contacts ON Calls.CallID = Contacts.ContactID
WHERE (((Calls.FollowUp)=Date()))
ORDER BY Contacts.Company;

BTW...I didn't realize I could do that. Thanks for a lesson learned!
Nov 5 '10 #9
gnawoncents
214 New Member
Okay, I created a Calls and Contacts table with the appropriate fields and data then created a query (qryFollowUp) using your exact SQL coding. I have good news and bad news. The good news is that it is working perfectly for me. The bad news is that doesn't really help me figure out why it isn't working for you.

When you say the query isn't working for you, what exactly do you mean? Does it show any records?
Nov 5 '10 #10
Fspinelli
85 New Member
darn!

Those are two tables, right? and in your query you put the follow up date field from Calls and a few of the Contacts fields in it and it worked?!

No records come up. Nada. I placed todays date in a few records and STILL - I get a blank.

Did you relate the two tables? I did, by contactID and callsID...yes??

I'm baffled!

And I greatly appreciate your efforts!
Nov 5 '10 #11
Fspinelli
85 New Member
Wait! Got it! It's the way I had them related. Hmmm...

But it worked!

Thank you so very much!

Have a fantastic weekend!

;)
Faith
Nov 5 '10 #12
gnawoncents
214 New Member
Glad to hear you got it! Let us know if you run into any more snags.
Nov 5 '10 #13

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

Similar topics

4
by: peashoe | last post by:
I have an asp page that uses a calendar.js (pop-up) file to add an exact date format in the text field (txtDDate). My problem is I need some javascript that sets an alert that does not allow them...
2
by: Norbert Lieckfeldt | last post by:
I am setting up a database for a friend who's an Optician, using MS Access 2002. All seems to be working well, but I have hit a snag. There's a calculated field both in a form and a query which...
3
by: umdsasha | last post by:
So, basically, I need to detect whether an alert window was thrown. I can't find where it's thrown from but I need to disable a button only if there were no alert windows thrown. Any ideas? ...
0
by: pinkfloydcat | last post by:
I need to update a Date field in an Access database to NULL or Space. I'm doing this with a SQL statement. Does anyone have an idea?
1
by: kunal0101 | last post by:
Hi, I am a new user to access and am building a database to capture the rotation dates for employees. There is a table called "Rotation schedule" which contains "name", "Duration (in weeks) and...
4
by: andrewbda | last post by:
I have tickbox on a form, and I would like to use a date field as the control source. i.e. I would like to have it display as ticked when a date exists in the field, and vice versa. Also,...
10
by: Jes | last post by:
Dear all I have a date field on a HTML form where the user is asked to key in dd/mm/yyyy However, when that is written to MySql it is either not accepted or another value is tored in the...
3
by: Alexio | last post by:
I need to enter a date into a text field when form is loaded. However I need this date to be static when the form is opened at a later date. I have the text box set to readonly. Will this be...
1
by: cruzzer | last post by:
I need to know how can I exclude a data item from the Alert Window’s list message if the user leaves a prompt window blank. Example : If the user types a value to both “idnumber” and...
2
by: slenish | last post by:
Hello, Im having an issue right now where im trying to link two tables in a query based on the date and then output the results to a report. What I have is a form set up to where you enter a...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.