funnygerl
04-24-2007, 10:12 AM
I have a table that is storing dates as mm/dd/yyyy. In the query I want my users to pull date blocks by entering month and year only (mm/yyyy). What is the expression that will prompt the user to enter mm/yyyy and pull the dates I want? I did this in a database years ago and I can't remember how I did it. Thanks everybody!
boblarson
04-24-2007, 11:51 AM
In the query, create a custom column of:
MyDate:Format([YourDateFieldHere],"mm/yyyy")
And in the criteria reference a form (I always use forms and never let the users touch the queries directly) with beginning and ending dates:
Between [Forms]![YourFormNameHere].[YourStartingDateTextBoxNameHere] AND [Forms]![YourFormNameHere].[YourEndingDateTextBoxNameHere]