Results 1 to 8 of 8
  1. #1
    sparkyinak is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2019
    Posts
    22

    Sharing data among forms

    Hi. My first post here and rather new to Access and have a pretty good background in Excel.

    I’m putting a form together that has a street address and mailing address block. If the mailing address is the same, there is a check box to be selected and I want the street address to be copied over to the mailing address automatically. From my research, it can be done with a SetTempVar macro which is new to me. Any suggestions?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    You can use VBA. In the after update event of the checkbox:

    Code:
    If Me.CheckboxName = True Then
      Me.MailingAddressTextbox = Me.StreetAddressTextbox
    End If
    adding however many fields are needed. If needed:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    sparkyinak is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2019
    Posts
    22
    I’ll give that a try later. Thanx

    thats way easier than what I could do far.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problem, post back if you get stuck. Welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    sparkyinak is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2019
    Posts
    22
    Will do. Thanx

  6. #6
    sparkyinak is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2019
    Posts
    22
    Ok. I built simple table and form to experiment first. In properties I wrote a VBA code for Check11 as Followed

    Private Sub Check11_Click()
    If Check11 = True Then
    StreetAddress = MailingAddress
    End If
    End Sub

    So on the form, I type in a Street Address and Click on then check box to duplicate it, the street address disappears and that’s it. No duplicate Mailing address. Suggestions?

  7. #7
    sparkyinak is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2019
    Posts
    22
    Nevermind. I figured out what I did wrong. It works
    thanx!

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Sharing temporary table data
    By LonghronJ in forum Modules
    Replies: 13
    Last Post: 06-18-2018, 12:21 PM
  2. Replies: 1
    Last Post: 03-05-2013, 04:47 PM
  3. Sharing data between sites ...
    By asearle in forum Access
    Replies: 1
    Last Post: 05-09-2012, 07:08 AM
  4. Sharing a data base
    By Cran29 in forum Security
    Replies: 3
    Last Post: 02-05-2011, 06:45 PM
  5. Data Sharing within Tables?
    By clai in forum Database Design
    Replies: 1
    Last Post: 11-06-2009, 06:32 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