date parameter trouble

G

Guest

My data entry table has a field called seizure with another field listing the
dates . I am trying to enter a parameter query which will give me the number
of seizure entries between two dates.

SELECT [Data Entry].Seizure
FROM [Data Entry]
WHERE ((([Data Entry].Seizure) Between [6/30/2006] And [8/01/2006]));


I keep on getting an error message about my expression being wrong. Can
anyone tell me what I'm doing wrong?
 
P

pietlinden

SELECT [Data Entry].Seizure
FROM [Data Entry]
WHERE ((([Data Entry].Seizure) Between #6/30/2006# And #8/01/2006#));
 
G

Guest

It didnt work because only a blank check box comes up when I hit RUN. I
copied and pasted your reply into my query criteria box... but now I'm
thinking the problem may be related to the fact that my data is entered into
the table with a check box. I was trying to add the column of check boxes.
Could that be the problem?
 
P

pietlinden

ferde said:
It didnt work because only a blank check box comes up when I hit RUN. I
copied and pasted your reply into my query criteria box... but now I'm
thinking the problem may be related to the fact that my data is entered into
the table with a check box. I was trying to add the column of check boxes.
Could that be the problem?

SELECT [Data Entry].Seizure
FROM [Data Entry]
WHERE ((([Data Entry].Seizure) Between #6/30/2006# And #8/01/2006#));
Excuse me? What do you mean "add the column of check boxes"? Add them
to the query? Or do math on them? Doing math on them is nonsense,
unless you want to count them
 
F

fredg

My data entry table has a field called seizure with another field listing the
dates . I am trying to enter a parameter query which will give me the number
of seizure entries between two dates.

SELECT [Data Entry].Seizure
FROM [Data Entry]
WHERE ((([Data Entry].Seizure) Between [6/30/2006] And [8/01/2006]));

I keep on getting an error message about my expression being wrong. Can
anyone tell me what I'm doing wrong?

You need to place the criteria on the Date field, not the Seizure
field.

SELECT [Data Entry].Seizure
FROM [Data Entry]
WHERE ((([Data Entry].DateField) Between [Enter Starting Date] And
[Enter Ending Date]));

You will be prompted to enter the starting and ending dates, which
allows you to change the date range without re-writing the query.
 

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

Similar Threads


Top