D
DawnTreader
Hello All
I thought i posted this once already, but it seems to have ended up in
posting limbo so here it is again.
i have this combo box which i need to get to change a text field on a form.
it all works great except that i cant get it to do 2 things. here is the code:
Private Sub cboChangeRep_BeforeUpdate(Cancel As Integer)
If MsgBox("Are you sure?", vbYesNo, "Change Service Representative?") =
vbYes Then
Me.ISServiceRepID = Me.cboChangeRep
Else
MsgBox "Change Aborted", vbOKOnly, "Aborted"
Cancel = True
End If
End Sub
there are 2 things i would like it to do. first, when the user aborts i
would like it to clear the combo box. if the user doesnt abort i would like
it to clear the combo box after it updates the other field.
everytime i put
Me.cboChangeRep = ""
in my code at the appropriate spots i get an error message saying:
run-time error '-2147352567 (80020009)':
the macro or function set to the beforeupdate or validationrule property for
this field is preventing DATABASE from saving the data in the field.
anyone know what i have done wrong? should i move the code to another event?
I thought i posted this once already, but it seems to have ended up in
posting limbo so here it is again.
i have this combo box which i need to get to change a text field on a form.
it all works great except that i cant get it to do 2 things. here is the code:
Private Sub cboChangeRep_BeforeUpdate(Cancel As Integer)
If MsgBox("Are you sure?", vbYesNo, "Change Service Representative?") =
vbYes Then
Me.ISServiceRepID = Me.cboChangeRep
Else
MsgBox "Change Aborted", vbOKOnly, "Aborted"
Cancel = True
End If
End Sub
there are 2 things i would like it to do. first, when the user aborts i
would like it to clear the combo box. if the user doesnt abort i would like
it to clear the combo box after it updates the other field.
everytime i put
Me.cboChangeRep = ""
in my code at the appropriate spots i get an error message saying:
run-time error '-2147352567 (80020009)':
the macro or function set to the beforeupdate or validationrule property for
this field is preventing DATABASE from saving the data in the field.
anyone know what i have done wrong? should i move the code to another event?