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 / Forms Programming / August 2005

Tip: Looking for answers? Try searching our database.

DoCmd.SetWarnings = False problem with custom function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Job - 05 Aug 2005 02:52 GMT
I have an Access form that when I click the update button it starts a series
of queries one of which is an update query that has an iif statment with a
custom function. When I run the code and set the warnings to false I get the
MaxLocksPerFile error and the database will no longer run that query either
through the code or manually.  If I create a new db and import everything
from the old db and comment out the setwarnings, everything works fine.

Any help is appreciated,

Cheers,

Job
Wayne Morgan - 05 Aug 2005 07:28 GMT
I don't know why you're getting the error, but if the query will run if you
don't use the SetWarnings statement, you may be able to use a different
syntax to run the query.

CurrentDb.Execute "QueryName", dbFailOnError

This will run the query without prompting you. It will return an error if
the query fails to complete successfully.

Signature

Wayne Morgan
MS Access MVP

>I have an Access form that when I click the update button it starts a
>series of queries one of which is an update query that has an iif statment
[quoted text clipped - 9 lines]
>
> Job
Job - 09 Aug 2005 04:44 GMT
> I don't know why you're getting the error, but if the query will run if you
> don't use the SetWarnings statement, you may be able to use a different
[quoted text clipped - 4 lines]
> This will run the query without prompting you. It will return an error if
> the query fails to complete successfully.

Wayne,
That did the trick!

Cheers,

Job
 
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.