In the attached DB I want the data of the control named "difference to be transferred to the yellow control immediately on change. I have written a code on the "change " event but it is not working. Please guide me.
In the attached DB I want the data of the control named "difference to be transferred to the yellow control immediately on change. I have written a code on the "change " event but it is not working. Please guide me.
Add the red line for frm_NTransac
Code:Private Sub Form_Current() Text31 = Text29 'MsgBox "Current" 'Text27 = Text29 If Me.Text29.Value = 0 Then Me.Text29.BackColor = vbWhite Else Me.Text29.BackColor = vbRed End If End Sub
Last edited by davegri; 11-19-2018 at 11:47 PM. Reason: sp
Why not use Conditional Formatting rules to dynamically set backcolor?
Text29 is a calculated value, its Change event will not trigger as a change must be by typed input, not calculation.
Consider:
Private Sub Frm_NIssued_Exit(Cancel As Integer)
Me.Text31 = Me.Text29
End Sub
Private Sub Frm_NReceived_Exit(Cancel As Integer)
Me.Text31 = Me.Text29
End Sub
Saving this calculated value is not necessary. It can be calculated when needed.
Might want to fix or remove non-functional code in the subforms.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thanks for your advice "Saving this calculated value is not necessary. It can be calculated when needed." I am working on it.Why not use Conditional Formatting rules to dynamically set backcolor?
Text29 is a calculated value, its Change event will not trigger as a change must be by typed input, not calculation.
Consider:
Private Sub Frm_NIssued_Exit(Cancel As Integer)
Me.Text31 = Me.Text29
End Sub
Private Sub Frm_NReceived_Exit(Cancel As Integer)
Me.Text31 = Me.Text29
End Sub
Saving this calculated value is not necessary. It can be calculated when needed.
Might want to fix or remove non-functional code in the subforms.