Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 12th, 2006, 03:32 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
Default MaxRecButton

Hi,

Can anyone tell me how to change this property or
why I'm getting this message?

"you entered an expression that has an invalid reference to the property MaxRecButton"

access help says the button is on the nav. button line, but I don't see it on my form, in design mode when I select show the nav. buttons.

Thanks

-Dave

 
Old June 13th, 2006, 06:31 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Whenever you run any code on a form or report, Access checks ALL the code on the form or report. If you delete a button or other control and don't delete its code, then you may get errors as Access debugs the code.

Check the code for your form and perhaps you will find this button code still there.

Did that help?


mmcdonal
 
Old June 13th, 2006, 09:20 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That fixed it.
I had some old code that I had commented out, but I guess it was messing something up. I deleted it and I haven't gotten anymore errors.

Thanks again mmcdonal

strong with you, is the Force.

-Dave


 
Old June 13th, 2006, 09:51 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Yeah, you can comment out the code, but if there is a reference like for a button click event and the button is gone, then the form looks for the button. So commenting may not always work unless you comment out the Sub line as well. All lines in the sub.

Slimey? Mudhole? My home this is! Yeeeess.



mmcdonal
 
Old June 13th, 2006, 10:07 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well,
 I started getting the MaxRecButton error again.
I changed something, got the error, changed it back exactly like it was before, and I still got the error.
So, I stepped through the code and found that it was working until the very end where it skipped down to the "MsgBox Err.Description" line at the very bottom, which was automatically spawned by Access when I created my OpenReport button. I commented that line out and now it works.
Is commenting that line out bad practice?

-dave










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