Results 1 to 6 of 6
  1. #1
    ariansman is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    57

    put data from one form to another

    There are two forms: FormA and FormB, both are open. FormA has a controller named "controlerA" and formB has "ControlerB". Is it possible that controlerB in formB gets the value in ControlerA each time ControlerA updates or changes?
    Thank you

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    I'm sure it's possible, but more details or sample data/code/graphics would help readers understand your situation/opportunity.

    What tables/queries underlay your forms?

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Why are you duplicating data? How are these records related? As Orange said, certainly possible but more information is needed. Code in ControlerA AfterUpdate event would likely be needed.
    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
    ariansman is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    57
    does the afterupdate of ControlerA in formA puts data in FormB?

  5. #5
    ariansman is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    57
    I have simplified the DB here and attached it.
    FormA relies on a query showing Jack's payment if working is No. when Working is checked to Yes, ControlerA, which is yellow here, shows the sum. FormB is not relying on a table or query, but i need the controlerB to show the number in ControlerA. please lets put aside what is the logic behind this, and see how these two are doable:
    1- ControlerA should show the Sum instantly after the "working"checkbox is checked to yes.
    2- Any change in controlerA shows up in ControlerB on formB rightaway.
    please ignore file ariansman2 and review ariansman3. i could not delet ariansman2.
    thank you
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Impossible to put aside logic. Logic is what programming is based on. However, ignoring your reasons for this arrangement, consider:

    The Sum calc will not adjust until record or the data edit is committed to table. Record entry/edit is committed when: 1) close table/query/form; or 2) move to another record; or 3) run code to save.

    There is no ControlerA. Both textboxes are named ControlerB.

    Then options:

    1. expression in FormB textbox: =[Forms]![FormA]![ControlerB] then open FormB or if already open have to Refresh the form (button on ribbon or code)

    2. code behind FormA sets value of FormB textbox - the real trick is figuring out what event to use, perhaps AfterUpdate of form
    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.

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

Similar Threads

  1. Replies: 7
    Last Post: 07-24-2017, 11:47 PM
  2. Replies: 6
    Last Post: 04-04-2015, 08:10 AM
  3. Replies: 3
    Last Post: 03-19-2015, 02:11 PM
  4. Replies: 4
    Last Post: 02-14-2014, 11:09 AM
  5. Replies: 1
    Last Post: 12-21-2011, 02:11 PM

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