Results 1 to 4 of 4
  1. #1
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    Transferring Data

    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.
    Attached Files Attached Files

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,405
    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

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,896
    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.

  4. #4
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155
    Quote Originally Posted by June7 View Post
    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.
    Thanks for your advice "Saving this calculated value is not necessary. It can be calculated when needed." I am working on it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Transferring Data From Excel
    By garrettgivre in forum Access
    Replies: 2
    Last Post: 09-17-2013, 12:30 PM
  2. transferring data from a Word document
    By bdaniel in forum Programming
    Replies: 5
    Last Post: 01-03-2012, 11:16 PM
  3. Replies: 9
    Last Post: 12-27-2011, 01:06 PM
  4. Transferring data to a second form
    By JayX in forum Access
    Replies: 2
    Last Post: 12-15-2011, 11:31 AM
  5. transferring data from word to access
    By RickScolaro in forum Access
    Replies: 6
    Last Post: 09-08-2011, 05:17 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums