Using calendar control to get dates for query

  • Thread starter Thread starter Matt Williamson
  • Start date Start date
M

Matt Williamson

I have a query that uses "between [enter start date] and [enter end date]"
as the criteria for a date. What I'd like to do is replace the message boxes
that ask for the dates with a calendar popup form. I added the
MSCAL.Calendar.7 control to a form and set the properties so it's a modal
popup. I can get the calendar to pop up and use the value for a textbox on a
form on the doubleclick event of the textbox, but I'm not quite sure how to
get it to popup when running a query.

TIA

Matt
 
I am interested on this subject too.
How can I put the date selection criteria from the pop up
form to the header of the report, so when user runs the
report they will now the dates that they have selected on
the form for this report to run.

Thank you
Johnny
 
Hi ,

The answer is still the same, you just extend the logic. Using a textbox in
the report header, you would use syntax in the control source similar to
the following:

="This report covers " & [Forms]![Form1]![BeginDate] & " to " &
[Forms]![Form1]![EndDate]


I hope this helps! If you have additional questions on this topic, please
reply to this posting.

Need quick answers to questions like these? The Microsoft Knowledge Base
provides a wealth of information that you can use to troubleshoot a problem
or answer a question! It's located at
http://support.microsoft.com/support/c.asp?M=F>.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.

Regards,
Dennis Schmidt
Microsoft Support
 
Hi Dennis,

This logic is working on Report Header.
My boss wants this date on each page of the report.
I placed the logic on Page Header.
It is working only for page one.On the other pages of the
report it gives #Error.

Any idea please, how to fix this on other pages?

Thank you

Johnny
 
Dennis,
on Thread: Q for MikeB on Calendar, I furnished some example code there that Cancels the load of
the Report if the values to be passed are not present, presents the form, validates the values, then
recalls the report. This is not done in a query scenario, but it might be of use to your OP.
 
Hi Johnny,

Check your syntax. That indicates there is something wrong with the syntax.

I hope this helps! If you have additional questions on this topic, please
reply to this posting.

Need quick answers to questions like these? The Microsoft Knowledge Base
provides a wealth of information that you can use to troubleshoot a problem
or answer a question! It's located at
http://support.microsoft.com/support/c.asp?M=F>.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.

Regards,
Dennis Schmidt
Microsoft Support


This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.

Regards,
Dennis Schmidt
Microsoft Support
 
Back
Top