using Between in a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Try this

Select * From TableName Where FieldName Between [Please enter start year]
And [Please enter end year:]
 
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
 
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
 
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
 

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

Back
Top