Runtime error 2115 at Access 2013 -


My Access database is connected to my SQL Server 2008. Called diverNo) is a number (only numbers are allowed in this area). I want to validate the user as well as leave the field, and if the user tries to put any character which is not a number, then the field will be cleared:

  Private sub Form_interval (Answer as integer, as the DataErr integer) If DataErr = 2113 then response = acDataErrContinue MsgBox ("Only numbers in dieer numbers are acceptable") Me.diverNo = "" '>   

I get the runtime-error 2115, which states, "For this field set the macro set for earlier or later Microsoft Office Access is being prevented from saving data in the Function field. "

Any suggestions for deciding this?

undo method and cancel From True to update before handler works.

  Private sub-dieer Noebeforeforedate (Cancel as integer) If IsNumeric (Me.diverNo) = False Then Cance L = true 'prevents record from saving Me.diverNo.Undo' only Control is affected only if you want to evaluate the old vs. new value, if you are sub-based sub  

update before MSBbox ("Please only enter a number") field (for a bound field) it was lost in the AfterUpdate method That's because the record has already been updated.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -