I have a query with a field name (date) with a criteria of
>=[start date] And <=[end date]
I would like to be able to add a calendar control to select the dates.
I have a query with a field name (date) with a criteria of
>=[start date] And <=[end date]
I would like to be able to add a calendar control to select the dates.
in a form, put 2 text boxes: txtStartDate and txtEndDate
set the format of the boxes to SHORT DATE,
now when the user put the cursor in the box, a date picker will appear to the right of the box. (eazy peezy)
the query will then use:
select * from table where [date] between forms!myForm!txtStartDate and forms!myForm!txtEndDate
Hi Ranman256 , I did what you said and I added the select statement to the query under the field Date in the criteria. I get the following error
check the subquerys syntax and enclosed the subquery in parentheses
no subquery exists. none are needed.
do NOT do this in sql, use a query, they always get the syntax correct.
I have a query with a field date I am putting this in the criteria for that field.
Is not the correct place.
I made a form like you said and added the two text box I names the form calendar ( it only has the two text boxed) then I went back to my query and tried to add to the criteria the select statement you said to use. Not sure if I am doing it right
I got it to workI have a query with a field date I am putting this in the criteria for that field.
Is not the correct place.
I made a form like you said and added the two text box I names the form calendar ( it only has the two text boxed) then I went back to my query and tried to add to the criteria the select statement you said to use. Not sure if I am doing it right
between[forms]![calender]![txtstartdate] and [florms]![calendar]![txtenddate]
put a run query button on the form and it works. Tank you
Does your date field data include time? If so, Between probably won't work as you expect.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.