Parameter query

T

Tinius Olsen

Have a calibration database that has a parameter query to
show what gages are due for the month, example: "Between
[Type the beginning date:] And [Type the ending date:]"

The problem is if one inputs 01/01/2003 for the beginning
date and 12/31/2003 as the ending date the query displays
records after 12/31/2003. Why does it not stop the query
at 12/31/2003 rather then also displaying those due in
2004? Is there another Criteria that should have been
chosen rather then "Between"?

TIA
 
B

Brian Camire

This can occur if the data type of the date field in your table is Text and
not Date/Time.

For example, the text (not the date)

"01/01/2004"

is *less* than the text

"12/31/2003"
 
H

Howrd Brody

Yes, 'Between' is the comparison parameter you want to use.

As simple as it sounds, make sure the criteria and the
field being displayed are correct. I had a similar
situation with InvoiceDates and InvoiceDueDates; We ran a
query for monies billed over a year and got back a 15
month spread - because we were displaying the 'Due' field
instead of the one we wanted.

Other than that, you might also want to check the
type/format of the Date field(s). Access sorts the same
values differently, based on the data type.

Hope this helps!

Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top