Hello @ all,
I'm tying to get a automatic reminder for Birthdays from are "MDB" file
The dates are saved into a colum which is also formated as "Date"
As only need to check if Month and Day I tried to use following command
Select * from [Adressbook] WHERE DatePart("m",[Birthday]) = 01 AND DatePart("D",[Birthday]) = 16
This one works fine if I use MDB Viewer Plus. But unfortunally it does not work with Macro Schedular.
Do you know an advise how I can get this work.
Best regards
HolyAbsolut
MDB File & Date
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
I think DatePart is an Access/VBA function. It therefore has no context in an SQL query made outside of Access.
Here's an idea: Create a query in Access which chucks out all columns from Addressbook as well as two extra columns which chuck out DatePart("m",[Birthday]) and DatePart("D",[Birthday]). Call these BirthDayMonth and BirthDayDay for example.
Then in your Macro Scheduler SQL query this query instead:
Select * from [YourQueryName] WHERE BirthDayMonth = 01 AND BirthDayDay = 26
Simpler.
Here's an idea: Create a query in Access which chucks out all columns from Addressbook as well as two extra columns which chuck out DatePart("m",[Birthday]) and DatePart("D",[Birthday]). Call these BirthDayMonth and BirthDayDay for example.
Then in your Macro Scheduler SQL query this query instead:
Select * from [YourQueryName] WHERE BirthDayMonth = 01 AND BirthDayDay = 26
Simpler.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 17
- Joined: Wed Sep 21, 2011 10:28 am