Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2015
    Posts
    17

    Question Unanswered: Duplicating data in one field in main in a similar field in a subform

    I"m working on a property database.

    The main form is called Properties.

    There are two subforms called Contacts and Tenancies.

    The main form has a text field called Property which contains the address of the property. The subforms also have similar but currently empty text fields.

    I want the subforms to automatically have the address of the property added when they are created.

    At the moment I am using a drop down menu to add the address to the forms, but I'm sure there's a way of
    doing it more elegantly.

    I have tried creating a link between the two fields by using such Control Source code as =[Property] and =[Properties]![Property] or similar but nothing seems to work. I know that the code is the problem but I don't know how to fix it.

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,482
    Provided Answers: 11
    form.object = form.object

    Code:
    If Form_MyTraining.EMPID.Value <> Form_Main.LoginID Then
            Me.Assessor = DLookup("Sign", "EMP", "empid = " & Form_Main.LoginID)
    End If
    My question is Why Duplicating data

    if someone changes the address in one but not the other which one is right

    I would put it in a event afterupdate a feild
    hope this help

    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
    DONT WORRY ABOUT THOSE WHO TALK BEHIND YOUR BACK
    THEY'RE BEHIND YOU FOR A REASON

  3. #3
    Join Date
    Jun 2015
    Posts
    17
    So I can add this code to an After Update?

    I also don't understand what I am supposed to substitute into your code to make it work for me. Which one is the mother and which is the child?

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
  •