Form to Filter Report Data

scouser

Registered User.
Local time
Today, 16:16
Joined
Nov 25, 2003
Messages
767
Hi to all. In the old days I had a form that allowed users to select values, click OK and then call a report.

The underlying query criteria values as follows:

Code:
#1
Like "*" & [Forms]![frmOrderAnalysisByServiceType]![cmdServiceType]

Code:
#2
Between [Forms]![frmOrderAnalysisByServiceType]![txtClick1] And [Forms]![frmOrderAnalysisByServiceType]![txtClick2]
#2 above used the now depreciated MSCAL.Calendar.7

So my question is. How can I allows users to select between 2 date ranges on a form to filter the result set?

Thanks,
Phil.

PS: I will post a sample DB if this helps.
 
So Phil, Let me know if I have this right.. You have designed a Form that now uses two text box controls that uses Access's Inbuilt Calender?.

If so all you have to do is, just replace the [frmOrderAnalysisByServiceType] to the Form you have created with the two text boxes.. and [txtClick1] and [txtClick2] to the two text boxes you have..
 
Hi Paul. Not quite, I have not added the text box controls that use Access's Inbuilt Calender. I did have a play by adding 2 txt fields, but when I launched the form the inbuilt calendar did not display.

You understand what I want to achieve though. The from will have a drop down where they select the value they want to report on + 2 calendars to select 'From' and to Dates'.

Thanks,
Phil.
 
Phil, I am not sure if you visited the other thread where I did mention how to make the calender appear..
If I am correct, Access 2010 has an inbuilt calendar that does not require a user defined code/form that acts like the calender.. To get the calender just make the field's format as Shot/Long/Medium Date and the Show Dates property as 'For Dates'..
So try that.. Post back if it is still causing trouble...

P.S. I am sorry, I will not be able to show any working demo/look at any DB, as I am at home right now and do not have Access on my laptop. :(
 
Hi Paul. I run Access 2007 on my laptop, Access 2010 on my desktop. I have got it working in 2007. I added ActiveX Controls (Calendar) which when selected update unbound text fields txtClick1 and txtClick2 with date selected.
Regards,
Phil.
 

Users who are viewing this thread

Back
Top Bottom