The error message you're getting might be related to any of the fields' values that are being updated/edited on the form. Is this checkbox code the only change you've made since the form was working ok?
Try moving the code to the form's BeforeUpdate event instead of the form's AfterInsert event. --
Ken Snell <MS ACCESS MVP> http://www.accessmvp.com/KDSnell/
"jomara via AccessMonster.com" <u27274[ at ]uwe> wrote in message news:8d2f9dc6220fa[ at ]uwe...
[Quoted Text] > Sorry i am getting a message that the data could not be saved > > jomara wrote: >>Thanks for the quick reply must have done soomething wrong here is my code >>Private Sub Form_AfterInsert() >>If Me.Rep = "78" Then _ >> Me.ColdCall.Value = True >> >>End Sub >> >>the End If caused a compile error so i took it out >>rep is the field for the user, 78 is the user number, and coldcall is the >>yes/no checkbox >>>Use the form's AfterInsert event to set the value of the checkbox: >>> >>[quoted text clipped - 9 lines] >>>> and gives to sales people. then i can run a query to display all the >>>> contacts where the box is yes. I > > -- > Message posted via AccessMonster.com > http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1>
|