Working w/dates in MS Access

FatJackSprat

Senior member
May 16, 2003
431
0
76
The dates have already been entered in the format "09/21/04" and I need to filter the records by month. Once I have more records, I will also need to filter by month and year. I want to return only those records within a specific month and year, so I'm looking to do more than sort them.

I have thought of making a textbox that uses the current date record as its data source and then displayng only the month in that textbox. That works, but I don't know how to filter or sort on the basis of what displayed as text instead of the underlying records.

If I could take what is displayed as text in that box and have it automatically entered into a new category called "month" then I would be able to filter just that category.

I should have set up different categories for date and year, but I have already entered many records and I don't want to go back and re-enter them to do that.

I know some VB, but don't generally program or work with Access.
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
Huh? I don't understand the question maybe. Are the dates stored as strings or dates? If they are stored as dates you can just look for records >= #9/1/2004# (first day of month to filter) and < #10/1/2004# (note it's < and not <=)
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
Depends on what you are trying to do. Do you just have some data and you want to see some of it? Is this going to be used somewhere regularly? In a report?
 

FatJackSprat

Senior member
May 16, 2003
431
0
76
I have been entering the names and addresses of my employer's clients so that I can contact them for private business (my employer knows). I want to wait about five to six months after they have seen my employer, that's why I want to filter by specific dates.

I am also going to make a "copy" button that pulls out the names, address, and closing date of the parites and puts it in a form letter. I hope to use this on a monthly basis.

Thanks
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
Sorry I'm not following. Is this an access Form? VB App? What is it you are "entering" data into? Are you opening up the tables directly?
 

FatJackSprat

Senior member
May 16, 2003
431
0
76
Sorry about not being too clear about this.

I am using an Access form. When I first started, I chose chose to work with a template and chose the "Contact Management" database. I then went in a modified some of the category/column (?) titles to what I wanted, but left the format and everything else the same. After that I just started entering data, peoples names, addresses, local region, date they were in the office, etc. Now I want to start sending form letters to these people. I would ultimately like to have all of the information for people who were here in the same month displayed one record at a time so that I can review it before adding it a letter.

If I had thought ahead, I would have made separate columns for the day, month, and year. Now I have the dates entered in date format as "01/01/01" instead of January 1, 2001.

Thanks.