Need Help with query

Branagan

Registered User.
Local time
Today, 21:06
Joined
May 27, 2004
Messages
31
I want a user to enter a start date and a finish date using a msg box so that it displays all the date between them dates using a query, how would i go about doing that
 
As the criteria:

Between [Enter Start Date] And [Enter End Date]


...is the simplest, quickiest, and nastiest way.

Personally, I think this is open to much errors so I would use a calendar and reference the form so that the users isn't asked in such a way as you'll see if you try that.

Maybe, if you do a search on one of my calendar examples, you'll see a better way. ;)
 
Branagan said:
I want a user to enter a start date and a finish date using a msg box so that it displays all the date between them dates using a query, how would i go about doing that

I place this type of thing in the query criteria

>=[Forms]![Attempts]![1] And <=[Forms]![Attempts]![2]

[1] and [2] are unbound text boxes on the form Attempts
 
Mike375 said:
I place this type of thing in the query criteria

We've all heard about that database... :p

I know the expression works and you'll defend it to the death but Between..And is the better operator for a range. :)
 
Mile-O-Phile said:
We've all heard about that database... :p

I know the expression works and you'll defend it to the death but Between..And is the better operator for a range. :)

Mike

Elaborate. Is Between..And..more reliable?

How would you replace

>=[Forms]![Attempts]![1] And <=[Forms]![Attempts]![2]

and I will do it... an report back :D

Mike
 
Between [Forms]![Attempts]![1] And [Forms]![Attempts]![2]


Even safer, would to ensure that it is converted to a date - extra check. :)


Between CDate([Forms]![Attempts]![1]) And CDate([Forms]![Attempts]![2])
 
Mile-O-Phile said:
As the criteria:

Between [Enter Start Date] And [Enter End Date]


...is the simplest, quickiest, and nastiest way.

cheers Mile-O-Phile that worked great. Thing is tho i aint using a form to put this on, it would just be a case of opening the query from the query section of access. Would i still be able to use the calender or not ?

if so how

cheers in advance :D
 
Mile-O-Phile said:
Between [Forms]![Attempts]![1] And [Forms]![Attempts]![2]


Even safer, would to ensure that it is converted to a date - extra check. :)


Between CDate([Forms]![Attempts]![1]) And CDate([Forms]![Attempts]![2])

Used the second one and all worked fine :)
 
the first one mie give me works fine.

how would i make the results displayed on a form that i create ? instead of showing the results in a table
 

Users who are viewing this thread

Back
Top Bottom