Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / April 2008

Tip: Looking for answers? Try searching our database.

How Do I Avoid this 4227 error?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
doyle60@aol.com - 21 Apr 2008 18:46 GMT
I get the run-time error '2427' error with the message "You entered
an
expression that has no value" when I run a certain report.  The query
is already difficult enough.  I'd rather just interrupt the message
and insert my own message stating "You did not hit the Set Comparison
button" and have the report close down completely.  The error is due
to something in a subreport.

Someone gave me code to do something like this before but I have no
idea where in my database it is.  It's pretty big at this time.

Thanks,

Matt
akphidelt - 21 Apr 2008 21:55 GMT
In the code you can catch the error like this

On Error GoTo Err_NotClicked

Then at the bottom of the code write

Err_NotClicked:
       MsgBox "Enter your message here", vbCritical

Make sure you put an Exit Sub before the Err_NotClicked:
Otherwise the message will show up everytime the button is clicked regardless.

> I get the run-time error '2427' error with the message "You entered
> an
[quoted text clipped - 10 lines]
>
> Matt
doyle60@aol.com - 23 Apr 2008 21:33 GMT
Thanks.  I followed your directions and the error message does not
come up.  But the report still opens, showing blanks and "errors".

How do I get the report not to pop up at all?

The code is in the On Print of the detail section.

Thanks again,

Matt
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.