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

Find or Search for a date on startup.

P: n/a
I have a table that contains a field called RDATE (reminder date).
Dates are optionally entered to remind a user of an upcoming event. I
have a reminder button that launches a popup form, and a list of all
the reminder fields that actually contain dates and a corresponding
explanation, pops up.
This is handled by a query.

I created a backlight to the button that will light when a reminder
date is coming up. How do I check the table on application startup,
to see if a reminder date is coming up. This is a single main table,
that is ordered by a different field. Any ideas for the best
approach ?

Thanks
Greg
Aug 25 '08 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Greg (co*****@gmail.com)" <co*****@gmail.comwrote in
news:80e3962a-c4ee-4b92-b45c-
30**********@k37g2000hsf.googlegroups.co
m:
I have a table that contains a field called RDATE (reminder date).
Dates are optionally entered to remind a user of an upcoming
event. I have a reminder button that launches a popup form, and a
list of all the reminder fields that actually contain dates and a
corresponding explanation, pops up.
This is handled by a query.

I created a backlight to the button that will light when a
reminder date is coming up. How do I check the table on
application startup, to see if a reminder date is coming up. This
is a single main table, that is ordered by a different field. Any
ideas for the best approach ?

Thanks
Greg
You'll need to make a query that selects datediff("d",date(),rdate)
with criteria between 0 and 7 for a week or another number of days,
and test that with a dcount(), if there are 0 records, then no
reminders for the period. I'd put the dlookup() in the form's On
Open or On Load event.
--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
Aug 25 '08 #2

P: n/a
Thanks Bob

Would it be easier or as effective to use .Find or .Seek ?
I was just researching this.

Thanks Greg
On Aug 25, 6:12*pm, Bob Quintal <rquin...@sPAmpatico.cawrote:
"Greg (code...@gmail.com)" <code...@gmail.comwrote in
news:80e3962a-c4ee-4b92-b45c-
306a54f18...@k37g2000hsf.googlegroups.co
m:


I have a table that contains a field called RDATE (reminder date).
Dates are optionally entered to remind a user of an upcoming
event. I have a reminder button that launches a popup form, and a
list of all the reminder fields that actually contain dates and a
corresponding explanation, pops up.
This is handled by a query.
I created a backlight to the button that will light when a
reminder date is coming up. *How do I check the table on
application startup, to see if a reminder date is coming up. *This
is a single main table, that is ordered by a different field. Any
ideas for the best approach ?
Thanks
Greg

You'll need to make a query that selects datediff("d",date(),rdate)
with criteria between 0 and 7 for a week or another number of days,
and test that with a dcount(), if there are 0 records, then no
reminders for the period. I'd put the dlookup() in the form's On
Open or On Load event.

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.com**- Hide quoted text -

- Show quoted text -
Aug 25 '08 #3

P: n/a
"Greg (co*****@gmail.com)" <co*****@gmail.comwrote in
news:a372edf8-4a22-4a3c-9935-4e9f3c193d18
@f36g2000hsa.googlegroups.com:
Thanks Bob

Would it be easier or as effective to use .Find or .Seek ?
I was just researching this.

Thanks Greg
To use the .find or .seek methods, you need to open a recordset
(again a filtered query). using the dCount against a stored query
once per session isn't going to impose a penalty of more that a few
milliseconds per session. Not worth the extra coding involved in the
recordset setup, imnsho.

Q
>
On Aug 25, 6:12*pm, Bob Quintal <rquin...@sPAmpatico.cawrote:
>"Greg (code...@gmail.com)" <code...@gmail.comwrote in
news:80e3962a-c4ee-4b92-b45c-
306a54f18...@k37g2000hsf.googlegroups.co
m:


I have a table that contains a field called RDATE (reminder
date).
Dates are optionally entered to remind a user of an upcoming
event. I have a reminder button that launches a popup form, and
a
list of all the reminder fields that actually contain dates and
a
corresponding explanation, pops up.
This is handled by a query.
I created a backlight to the button that will light when a
reminder date is coming up. *How do I check the table on
application startup, to see if a reminder date is coming up.
*This
is a single main table, that is ordered by a different field.
Any
ideas for the best approach ?
Thanks
Greg

You'll need to make a query that selects datediff("d",date
(),rdate)
>with criteria between 0 and 7 for a week or another number of
days,
>and test that with a dcount(), if there are 0 records, then no
reminders for the period. I'd put the dlookup() in the form's On
Open or On Load event.

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.com**- Hide quoted text -

- Show quoted text -



--
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com **
Aug 26 '08 #4

P: n/a
Thanks for the good advice.

Greg
Aug 26 '08 #5

P: n/a
'This worked for me.

DLookup("[MyField]", "MyTable", "(Not IsNull(REMINDDATE)) And
(REMINDDATE <= Date())")
Aug 26 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.