I have a continuous form bound to a non-updatable recordset. Let's assume for a moment that there's a really good reason for that and there's no easy way to either make the recordset updatable or to bind the form to a temp table.
I want to make two of the textbox controls on this form unbound, but assign them a value from the underlying form record source as they are displayed. Since they are unbound I'll be able to edit values in these textboxes and use textbox events to execute some SQL to update the real values in the underlying tables.
I've been trying to make this assignment in the OnPaint event of the detail section of my form and this does in fact work, but generates huge flicker because I'm guessing the assignments are causing other paint events to get fired. Anyone have experience trying to do what I'm trying to do and have any suggestions? I tried setting a module level variable with the record key and only letting the OnPaint event update the values once per record but this seems to have no effect (see the code section for my OnPaint event.
Private Sub Detail_Paint()
'On Error Resume Next
If mlngSplitID <> Me.SplitID Then
Me.tbSplitAmount = Me.SplitAmount.Value
Me.tbOfficeCode = Me.OfficeCode.Value
mlngSplitID = Me.SplitID
If Me.SplitError = -1 Then
Me.tbSplitAmount.BackColor = vbRed
Me.tbSplitAmount.BackColor = vbWhite