using Between in a query

L

Lin Light

I have created a query using between 1980 and 1989. I have the need to check
several decades but I don't want to going into design all the time to change
the values of the years. When working with numbers BETWEEN 1970 AND 1979, I
don't want to go back into design and change 1980 and 1989 to 1970 and 1979.
I have setup other queries where I could use [ ] to enter in the value. Any
hints or ideas as to how to work with BETWEEN in the same fashion.

Lin
 
O

Ofer

Try this

Select * From TableName Where FieldName Between [Please enter start year]
And [Please enter end year:]
 
L

Lin Light

In (SELECT [Pub Date] FROM [dup check] Where [Pub Date] Between [enter first
yr] and [enter last yr] ) I found this to work.

Thanks for the idea to get me thinking

lin
 
L

Lin Light

I get "Check the subquery's syntax and enclose the subquery in parenthese".
Select * From dup check Where Pub Date Between [Please enter start year]
And [Please enter end year:] Is what I wrote. dup check is the table and
Pub Date is the field.

Lin


--
Lin Light Herrick District Library


Ofer said:
Try this

Select * From TableName Where FieldName Between [Please enter start year]
And [Please enter end year:]

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



Lin Light said:
I have created a query using between 1980 and 1989. I have the need to check
several decades but I don't want to going into design all the time to change
the values of the years. When working with numbers BETWEEN 1970 AND 1979, I
don't want to go back into design and change 1980 and 1989 to 1970 and 1979.
I have setup other queries where I could use [ ] to enter in the value. Any
hints or ideas as to how to work with BETWEEN in the same fashion.

Lin
 
O

Ofer

I'm glad you got it sorted out, good luck


Lin Light said:
In (SELECT [Pub Date] FROM [dup check] Where [Pub Date] Between [enter first
yr] and [enter last yr] ) I found this to work.

Thanks for the idea to get me thinking

lin

--
Lin Light Herrick District Library


Lin Light said:
I have created a query using between 1980 and 1989. I have the need to check
several decades but I don't want to going into design all the time to change
the values of the years. When working with numbers BETWEEN 1970 AND 1979, I
don't want to go back into design and change 1980 and 1989 to 1970 and 1979.
I have setup other queries where I could use [ ] to enter in the value. Any
hints or ideas as to how to work with BETWEEN in the same fashion.

Lin
 
Top