Between to dates

mamfa

New Member
Joined
Jun 23, 2006
Messages
25
i am in the middle of creating a database that hold records about what equipment is held at our business. each record is entered with a purchased date. i would like users to be able to search for a piece of equipment by entering a starting purchase date and an end purchase date so that they can find the item if they don't know exactly when it was bought.

i normal right my queries in the design view of the query so if it takes more than this will you explain because i am an access simpleton :)

thanks
samantha
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Andrew Fergus

MrExcel MVP
Joined
Sep 9, 2004
Messages
5,432
Hi Samantha

In your normal query design screen, under the date field use criteria either like this :

Between #09/09/2006# And #10/10/2006#

or like this :

>=[Enter First Date] And <=[Enter Last Date]

But beware with the second method that your users must enter the dates in the correct format.

HTH, Andrew
 

mamfa

New Member
Joined
Jun 23, 2006
Messages
25
thanks, i need a message box to pop up and ask them to enter the start date and end date, do i just add it with an OR after the first bit?
 

Andrew Fergus

MrExcel MVP
Joined
Sep 9, 2004
Messages
5,432
Hi

Try my 2nd suggestion :
>=[Enter First Date] And <=[Enter Last Date]

This method gives the pop-up boxes.

Cheers, Andrew
 

mamfa

New Member
Joined
Jun 23, 2006
Messages
25
i am having trouble with this still, the second way does produces parameter boxers however it seems just to produce any dates with the dates in them anywhere??

the column i am working from has a date input mask on it _ _/_ _/_ _ could this effect it? is there a better way of trying to get the results i want

sorry to be slow!!

Samantha
 

Andrew Fergus

MrExcel MVP
Joined
Sep 9, 2004
Messages
5,432
Hi Samantha
I don't understand the issue. This method provides pop up boxes but the user has to enter the dates. Is it not working or did you want the pop up boxes pre-populated with values? Or something else? I'm not following you at this point.....
Andrew
 

Forum statistics

Threads
1,136,262
Messages
5,674,709
Members
419,521
Latest member
Jasonnie

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top