Which Event Does This Belong In?

  • Thread starter Thread starter Bonnie
  • Start date Start date
B

Bonnie

I have a subform with a subsubform that only shows a few
bill payment facts. I need to bring 2 pieces of info over
into this record. To do this I have this: subsubform with
2 fields linked to base record, 2 unbound controls
(Me.InstallBill and Me.InstallBillPd) on subform to bring
data from subsubform to subform and finally:

Private Sub Form_Current()
If Me.InstallBillPd <> "" Then
Me.Installation_Fees_Paid = "-1"
Else: Me.Installation_Fees_Paid = "0"
End If
Me.Installation_Fees_Billed = Me.InstallBill
End Sub

The problem is: some folks are getting the Write Conflict
Error: 'this record has been changed by another user since
you started editing it, Save Record, Copy to Clipboard,
Drop Changes, etc.'. The whole purpose of this exercise
is to show the administrator if an installation bill has
1. been sent and 2 been paid.

Barring all that crapola above, is there an easier way to
do this that isn't rocket science, but maybe higher octane
than what I'm running? Is DLookUp an option? I've seen it
but not used it much. Not sure, looking for advice or
help...Thanks in advance for either as well as your time.
 
You are editing the current record every time hence the write conflict.
Delete the on current event!

One solution for the visual cue that work has been done is to use
conditional formatting on the unbound controls.

It seems that you're trying to automate the updating of records. I'm not
aware of your full situation but I would recommend the use of a button to
update the record and 'close' the sale, rather that automate the code as in
the OnCurrent event.
Alternatively, you could run an update query to close sales meeting the
criteria.

HTH, Graeme.
 
Thanks bunches for the advice. It makes better sense to me
now. I'll use a button as you suggest. Thanks!!!
 
Back
Top