Passing Date Value from MonthView Control to criteria of Query

J

Jeff

Hi,

I was not sure which newsgroup this would best fit in so sorry for the cross
posting. I have a query that returns records from a database based on the
following in the criteria field of one of the columns >#9/26/2005 6:00:00
AM# And <#9/26/2005 8:00:00 PM#. This was the only way that I could get
this query to work based on how the table was created, and I can not change
the table. I have created a form that I have made that has a couple of
buttons on it to run the query and the run and show the report. I usually
just run the query right now by going to the query design and manually
change the date every day, what I would like to do is from the form that I
have added a MonthView Control is just select the date from the calander
control and have that date as the criteria and just have the time part hard
coded because that never changes. But so far everything that I have tried
putting into the criteria field to reference the value of the MonthView
control gives me an invalid expression error.
Could someone explain how this is done, I know I could completely write the
query in code but I would like to try it this way first.

Thanks for the Help,

Jeff
 
M

[MVP] S.Clark

WHERE MyField = Forms!MyFormName!MyControlName

Forms is just the word Forms, don't change it. Change the rest.
--
Steve Clark, Access MVP
FMS, Inc.
Call us for all of your Access Development Needs!
1-888-220-6234
(e-mail address removed)
www.fmsinc.com/consulting
 

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