also @ TechSpot: Motorola Droid 4 unboxing, hands-on video
Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Sign up or Login to participate.

Go Back   TechSpot OpenBoards > Software > Software Apps

Collaborate in the cloud with Office, Exchange, SharePoint, and Lync

Database Trick Part

Thread Tools Search this Thread
  #1  
Old 08-23-2005
Newcomer, in training
 
Member since: Jun 2005, 7 posts
Database Trick Part

I am building a database to keep info about clients. The trick part is that i want when a customers birthday occers, i want the system to print a report or a letter, automatically to the corresponding person that has his/hers birthday.
How can this be done?
  #2  
Old 08-23-2005
MrGaribaldi's Avatar
TechSpot Ambassador
 
Location: Babylon 5, Grid Epsilon
Member since: Feb 2002, 2,802 posts
First off, don't double post. We don't like it.

What database system are you using?

All you'd need would be a simple script running sending an SQL statement to the database, asking to retrive the dates birthdays..
Something along the lines of
Code:
SELECT name FROM users WHERE birthday = date;
which will return a list of all the people in the database who's birthday is today...
The script/php will have to supply the date in the same format that you've saved the birthdays...
  #3  
Old 08-24-2005
Newcomer, in training
 
Member since: Jun 2005, 7 posts
Database trick part.

I am using Access. What about printing automaticaly a report? How can the query calculate the correct month and day without calculating the year?
For example if someones birthdate is 12/11/1990 how will the query match the 12/11/2005 date if the year is different?
  #4  
Old 08-24-2005
Vigilante's Avatar
TechSpot Paladin
 
Location: Arizona, USA
Member since: Dec 2004, 2,120 posts
Maybe the first question should be, can access even MAKE this kind of "report"??

Does access allow you to create essentially a "letter" where it will automatically fill in the blanks of peoples' names and so forth? If it CAN, them we'll chat about the rest.
I've used Lotus Approach a few times, and I know it has a built-in function for creating envelopes where I can just click the button and boom, the current record's address is pasted on an envelope. So Access may have similar forms.

Lastly, the query to find such records is not terribly difficult. As you should be able to check just day and month of a date without worrying about the year. The VBScript should have such functions. But we'll worry about it later.

So then, NOT worrying about your query, can Access do the rest of what you need?
  #5  
Old 08-24-2005
TechSpot Evangelist
 
Location: Bridgend
Member since: Nov 2003, 2,371 posts
Aren't we simply talking about a mail merge with MS Word?? Not that I know how to do it with MS access these days - the last time I put a mail merge together was back in 1996. MS Works databases were far simpler back then as far as I can tell.
  #6  
Old 08-24-2005
TechSpot Evangelist
 
Location: has left the building
Member since: Aug 2003, 8,165 posts
You'd need to expand MrGaribaldi's code a little bit more and that is all, e.g.

SELECT firstname, lastname, address1, address2, city, zip, country FROM customers WHERE (bday_mm = check_mm AND bday_dd = check_dd)

For more syntax of SELECT see http://www.firstsql.com/tutor2.htm
Closed Thread

Similar Topics
Topic Replies Forum
Is This a Trick Question? 6 Audio and Video
Possible To Trick My System? 2 Audio and Video
How to trick a USB hub into staying on 0 Other Hardware

Thread Tools Search this Thread
Search this Thread:

Advanced Search
All times are GMT -4. The time now is 11:43 PM.