Results 1 to 6 of 6
  1. #1
    BudMan is offline Novice
    Windows 11 Office 365
    Join Date
    Nov 2014
    Location
    Stem, NC USA
    Posts
    23

    Question "Same As Above" checkbox to auto fill in data from earlier entered data


    I have a table containing the homeowners’ names, addresses, City, State, and Zip. I also have fields for the applicant’s name, address, City, State, and ZIP.

    I want to show a “Same as above” check box that will fill in the applicant’s name from the homeowner’s information or enter new data if it has not been checked. Is that even possible?

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi
    It is not normal to have the same home owners name in multiple records.
    It would help if you could explain your business process or upload a copy of the database.

  3. #3
    Minty is offline VIP
    Windows 11 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,157
    I'm guessing this is like a "Delivery Address", in as much as most of the time it will be the same as the Home Owner address but could be different.
    Is the Applicant address stored in a separate table or is it the same fields duplicated in the same table?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    I did something similar to enter over 23K records.

    Repeat for any fields you need to repeat.
    Note, I was only repeating the PK of respective tables, NOT the descriptions.

    Code:
    Private Sub Ship_ID_AfterUpdate()
        If Me.chkCopy Then
            Me![Ship_ID].DefaultValue = """" & Me![Ship_ID].Value & """"
        Else
            Me![Ship_ID].DefaultValue = 0
        End If
    
    
    End Sub
    Attached Thumbnails Attached Thumbnails Screenshot 2025-03-28 174924.png  
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    xps35's Avatar
    xps35 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2022
    Location
    Schiedam, NL
    Posts
    299
    Do not store the data if it is the same. That is redundant. If homeowner data changes, you must change applicant data also (risk of inconsistencies).

    Use events to make fields (un)visible depending on check box

    Code:
    Private Sub APsame_asHO_AfterUpdate()
    If Me.APsame_asHO Then
        Me.AP_name.Visible = False
        Me.AP_address.Visible = False
        Me.AP_city.Visible = False
        Me.AP_state.Visible = False
        Me.AP_zip.Visible = False
        
        Me.AP_name = Null
        Me.AP_address = Null
        Me.AP_city = Null
        Me.AP_state = Null
        Me.AP_zip = Null
    Else
        Me.AP_name.Visible = True
        Me.AP_address.Visible = True
        Me.AP_city.Visible = True
        Me.AP_state.Visible = True
        Me.AP_zip.Visible = True
    End If
    End Sub
    
    
    Private Sub Form_Current()
    If IsNull(Me.ID) Then 'new record, APsame_asHO = False
        Me.AP_name.Visible = True
        Me.AP_address.Visible = True
        Me.AP_city.Visible = True
        Me.AP_state.Visible = True
        Me.AP_zip.Visible = True
    Else
        If Me.APsame_asHO Then 'existing record; depends on APsame_asHO
            Me.AP_name.Visible = False
            Me.AP_address.Visible = False
            Me.AP_city.Visible = False
            Me.AP_state.Visible = False
            Me.AP_zip.Visible = False
        Else
            Me.AP_name.Visible = True
            Me.AP_address.Visible = True
            Me.AP_city.Visible = True
            Me.AP_state.Visible = True
            Me.AP_zip.Visible = True
        End If
    End If
    End Sub
    Groeten,

    Peter

  6. #6
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    What's the difference between a home owner and an applicant? Are they always the same person(s)? Maybe sometimes yes, sometimes no?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 6
    Last Post: 03-07-2018, 04:20 PM
  2. Replies: 2
    Last Post: 08-01-2017, 01:40 AM
  3. Replies: 14
    Last Post: 03-15-2017, 08:33 PM
  4. Replies: 9
    Last Post: 03-01-2017, 10:00 AM
  5. Replies: 2
    Last Post: 12-18-2012, 11:41 AM

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