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 / March 2005

Tip: Looking for answers? Try searching our database.

Referring to another event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mlwallin - 03 Mar 2005 20:31 GMT
I have some code that does complex validation in the form's before update
event.  If the validation fails, I set cancel to True.  How can I reference
whether the cancel was true or false in a subsequent or calling event?  I
want to construct an if statement, but don't know the syntax.

If Forms!frmFormName (cancel) Then
 do this if true
Else
 do this if false
End If
Sandra Daigle - 03 Mar 2005 20:42 GMT
I don't know that you can. Instead you should probably set a module level
variable at the same time and then refer to it. You'll want to be sure to
set your custom variable to false when the update is going to succeed.

Signature

Sandra Daigle [Microsoft Access MVP]
Please post all replies to the newsgroup.

> I have some code that does complex validation in the form's before
> update event.  If the validation fails, I set cancel to True.  How
[quoted text clipped - 7 lines]
>  do this if false
> End If
 
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.