p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Expert Access 2007 Programming ISBN 978-0-470-17402-9 (http://p2p.wrox.com/forumdisplay.php?f=371)
-   -   Error in Monthly Calendar Report (Ch9) (http://p2p.wrox.com/showthread.php?t=67846)

mruschetti May 2nd, 2008 04:36 AM

Error in Monthly Calendar Report (Ch9)
 
Whenever I tried to open the monthly Calendar Report an error pops up saying that " The Microsoft Access Database engine could not find the object "P1", When I click on Debug , the program stos at this line:

' fill the control values with data from the recordset
    For Each c In Me.Controls
        If (TypeOf c Is TextBox) Then
            If (Not IsNull(c.Value)) Then
                ' filter the recordset
                rs.Filter = "[Order Date] = #" & c.Value & "#"
                Set rs2 = rs.OpenRecordset()

The report ask you to input a start date , I´ve just enter 01/01/2006, any ideas ?.

Thank you



mruschetti May 5th, 2008 01:09 PM

Hi,

Any Clues about this error in the Monthly Calendar Report ????


robcooper May 5th, 2008 11:37 PM

Hi Maria,

Can you take the query that is created in the code and run it in a separate query to see if this works? I downloaded the sample code for the chapter and do not see the error.

Thanks!
Rob

Rob Cooper
Lead Software Design Engineer in Test
Microsoft Access Team

co-author: Access 2007 VBA Programmer's Reference
co-author: Expert Access 2007 Programming

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at microsoft.com/info/cpyright.htm.

mruschetti May 6th, 2008 10:53 AM

Thanks Robb for your repply, I would try it as soon as I´ll arrive at home.
I´ve already try with another query and also with another fields, but the code stops at the same line with the same message

When the code tries to open the second recordset with the filter information the code stops responding .



robcooper May 6th, 2008 11:44 AM

Unfortunately, I'm not sure why that is happening but am curious to see what happens when you try it on another computer. "P1" sounds like it could be a parameter that cannot be found perhaps?

Rob Cooper
Lead Software Design Engineer in Test
Microsoft Access Team

co-author: Access 2007 VBA Programmer's Reference
co-author: Expert Access 2007 Programming

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at microsoft.com/info/cpyright.htm.

mruschetti May 7th, 2008 09:06 AM

Rob, thank you again for your kind Help, I´ve just run again the module createmonthlycalendar, and then insert the code inside the report., and it works !!

Thank you again ..
Maria



robcooper May 7th, 2008 11:43 PM

Hi Maria,

Great job! Thanks for the update - glad to hear it's working.

Rob Cooper
Lead Software Design Engineer in Test
Microsoft Access Team

co-author: Access 2007 VBA Programmer's Reference
co-author: Expert Access 2007 Programming

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at microsoft.com/info/cpyright.htm.


All times are GMT -4. The time now is 11:09 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.