Re: Help needed re: parameter query

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Perhaps Access is misunderstanding the criteria.
To test that idea, declare your parameters.

In query design view, choose Parameters on the Query menu.
Enter 2 rows into the dialog:
[On! or AFTER (m/d/yyyy):] Date/Time
[On or BEFORE (m/d/yyyy):] Date/Time

Not sure the bang (!) is a good idea in the name, even though it's in square brackets.

If it still fails, try a compact/repair, in case there is a bad index.

If that doesn't work tell us:
a) In table design view, what data type is the [interview date] field?
b) What is the bad value that gets returned?
c) What criteria values did you enter for the 2 parameters?

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"s.f." <sf@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B92B1EBF-3F41-48C1-903D-AFFAC8600F34@xxxxxxxxxxxxxxxx
I create a parameter query to allow users to check records with interview
dates that fall between a specific time window on a timely basis. To do so, I
first create 2 fields as:

start_date: [On! or AFTER (m/d/yyyy):]
end_date: [On or BEFORE (m/d/yyyy):]

Then for the "interview date" field, I put in the criteria:
=[On or AFTER (m/d/yyyy):] And <=[On or BEFORE (m/d/yyyy):]

This way when opening/running the query, the user will be prompted to enter
a start date and an end date.

However, the test run picks up one record that falls outside the range
(along with all other records that are correctly selected). Would that be
possible that there's a bug? Any suggestions would be highly appreciated!

.



Relevant Pages

  • List Box Search
    ... having a text boxes filter out the results of list box. ... Close this query design view confirming to save the SQL ... The other thing you need is some way to have the listbox ... of records everytime you change your criteria. ...
    (microsoft.public.access.forms)
  • Using the "OR" cells in query grid
    ... If you have unbound control values setting the criteria in the query design ... Nulls in all of them, and you also want to allow for nulls in the underlying ... is null are placed in teh grid? ...
    (microsoft.public.access.queries)
  • Re: Displaying date
    ... If you are using the query design view, in the Criteria of the Start Date field, put like this... ... Use the Format property of the control on the form or report itself to control this. ...
    (microsoft.public.access.queries)
  • Re: >= 10 years query.
    ... Minor correction ... I would use criteria like the following if you needed to just ... Baby Face Lee wrote: ... > In the query design grid, write the following in the Field box: ...
    (microsoft.public.access.queries)
  • RE: Select only records past a key date
    ... In query design view, enter the criteria for each on the same row, thus ... creating a logical AND conjunction between the criteria. ... but excluding records that are closed (closed date is ...
    (microsoft.public.access.queries)