Question

I have run into an error with an Access Database created in MS-Access 2003. It's known the Calendar Control was deprecated in Access 2010 but unfortunately we need to keep using it. As a temp fix (until we can change to the date picker) we restored the MSCAL.OCX file on all 2010 users.

The issue:

We have a form to print schedules from a date range (using the calendar control). There is some VBA code to check to dates etc to make sure the range is accurate etc.

Everything works fine in 2003 but in 2010 the dates get selected fine on the form, is passed to the report (a print preview) fine as it displays in the footer BUT the query ignores the date range and prints ALL records (not just the records in the date range).

Is there any way I can step into Print Preview button when clicked to see what's being passed?

Any other ideas?

Was it helpful?

Solution

The issue with the filter not being applied to the report is a known Microsoft issue with certain set ups of Windows 7 and Access 2010. The hotfix found here: http://support.microsoft.com/kb/2596496 solved my problem.

I run Windows 7 64 bit and Office 2010 32 bit, when downloading the hotfix I selected the "x86" platform as that's the 32 bit. If you are using Office 2010 64 bit you should download the "x64" platform.

To find out your office version, open any office product, click File Tab, click Help and it will be on the right under "About Microsoft ".

OTHER TIPS

The only way you can really do that is if your report/query is running some VBA code and put a Stop on the the VBA.

If your query is referencing the fields directly (IMNSHO a bad practice, but I'll work with what we've got) you could change them so they instead reference a VBA function that returns the results of those fields instead. Then you know what it is getting for sure.

There is one more trick that surely worked out for me as a solution, before I came across the accepted answer about hotfix on this thread. Also, because, the hotfix link leads to a valid thread, but there are not downloadable files.

The workaround:

Make a copy of the report file. Use that name in VBA under DoCmd call. Strange how it works, though. Such is the nature of bugs, I guess.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top