Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runtime Error 2115 help 1

Status
Not open for further replies.

uttam1

Programmer
Aug 8, 2003
9
IN
Hi all,

I'm new here, had a question. I have a checkbox, check0, and a text field text0. When I check the checkbox, I want some text in the textbox. I have the code in the after update event of the checkbox, but this results in the runtime error 2115:

"The macro or function set to the BeforeUpdate or ValidationRule property for this field is preventing Access from saving the data in the field."

I don't have a validation rule, and have not used the beforeupdate event. Where am I going wrong?

All help is appretiated.

Thanks in advance,
-Uttam
 
Would you please post the code that you have in the afterupdate event??

It would be helpful.



DBAMJA

It is said that God will give you no more than you can handle. I just wish God didn't have so much faith in me.
 
Hi DBAMJA

Heres the code:

Private Sub Check0_AfterUpdate()
If Check0.Value = -1 Then
Text0.SetFocus
Text0.Text = "1"
End If
End Sub

Thanks, Uttam
 
Private Sub Check0_AfterUpdate()
If Check0 = True Then
Text0 = "1"
End If
End Sub


PaulF
 
Hi PaulF

Thanks for the reply, that worked fine!!!

Thanks again,
Uttam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top