Data Ranges in a Form

G

Guest

I have created a form with 2 fields in which the user will enter the “FROMâ€
value of a date in one field (let’s say 01-01-2007) and the “TO†value of a
date in the other field (let’s say 01-10-2007).

Once the user enters this range of dates in the 2 fields of the form, I
would like the query to pull the info than contains all the data in the
ranges specified (let’s say data from 01-01-2007 and 01-10-2007 both
included). How do I link both fields in the form and the query?
 
A

Azzna

Hello,

In the query, your where clause should read
where NameOfTableFromDate >= Forms!FormName!FromDate
ANd NameOfTableToDate <= Forms!FormName!ToDate

So, you are going to need 1 pieces of information. You type in Forms
then an ! then the name of the form the data resides on, then ! then
the name of the field you are looking for. That will populate the
query. I hope that helps!

Susan
 

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