Access2000 Database (Queries)

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Love_Daddy
Forum Commoner
Posts: 61
Joined: Wed Jul 10, 2002 6:55 am
Location: South Africa
Contact:

Access2000 Database (Queries)

Post by Love_Daddy »

Hi Guys, long-time and Happy new year to all of you.

I'm currently designing an access database and I need your help in expert query usage.

I need to get input from the user for a month to select andf I tried

Like "01/[Enter month to query]/2003" and it's not working, any better ideas?
fractalvibes
Forum Contributor
Posts: 335
Joined: Thu Sep 26, 2002 6:14 pm
Location: Waco, Texas

Post by fractalvibes »

Not sure exactly what you are trying to do i.e. web input not what problems you are encountering....

Access is different in that the date delimiters are #
so looking for rows with a date of 01-17-2003 you would do:
.....and MyDate = #01-17-2003#

With date fields you are best off having the user choose values from pre-determined drop-downs or a calender app - otherwise they'll enter
non-sensical dates like Feb 54th, etc.

See http://www.dynamicdrive.com - they should have some good javascript calender apps that you can use - they click on a little icon and a calender pops up and they click on a date - not foolproof , but much better than free-form text!

Phil J.
f1nutter
Forum Contributor
Posts: 125
Joined: Wed Jun 05, 2002 12:08 pm
Location: London

Post by f1nutter »

Not sure about 2000, but in Access 97 you can use datepart() to seperate out day, month, and year for selecting, ordering etc. You can then just select by month.

Check out the help file for exact syntax.
Post Reply