Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: auto fill some fields

  1. #1
    New Member
    Join Date
    Apr 2018
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default auto fill some fields

    Hi. I have 2 tables , first has people details , 2nd has these people visit (mob number , name surname there is in both tables and mobile is relationship one to many). I need when in 2nd table i put the phone , name and surname auto filled

    Thanks

  2. #2
    MrExcel MVP
    Moderator
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    45,984
    Post Thanks / Like
    Mentioned
    36 Post(s)
    Tagged
    5 Thread(s)

    Default Re: auto fill some fields

    Welcome to the Board!

    Typically, you wouldn't have BOTH mob number and surname in the both tables. You don't want situations where if a value changes (like surname), it needs to be changed in both tables, and you typically do not want key fields that you join on to be fields in which values can change. So I would recommend just keeping surname in the "people details" table, and remove it from the other.

    To further to that extent, you typically do not want to store the other information in multiple tables - unless the information may change and you are trying to track it for historical purposes. Typically, you would just join the two fields in a query, and return all the fields that you want to see in the query (so if there is no need to track what the data was at an exact point in time, there is no need to store it in the other table also).
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  3. #3
    New Member
    Join Date
    Apr 2018
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: auto fill some fields

    Quote Originally Posted by Joe4 View Post
    Welcome to the Board!

    Typically, you wouldn't have BOTH mob number and surname in the both tables. You don't want situations where if a value changes (like surname), it needs to be changed in both tables, and you typically do not want key fields that you join on to be fields in which values can change. So I would recommend just keeping surname in the "people details" table, and remove it from the other.

    To further to that extent, you typically do not want to store the other information in multiple tables - unless the information may change and you are trying to track it for historical purposes. Typically, you would just join the two fields in a query, and return all the fields that you want to see in the query (so if there is no need to track what the data was at an exact point in time, there is no need to store it in the other table also).
    I need these fields (name - surname ) for confirmation... I think that i can use 2 labels and i am looking for code like
    Private Sub kinito_AfterUpdate()
    Label1.Caption =
    label2.caption =
    End Sub

  4. #4
    MrExcel MVP
    Moderator
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    45,984
    Post Thanks / Like
    Mentioned
    36 Post(s)
    Tagged
    5 Thread(s)

    Default Re: auto fill some fields

    I need these fields (name - surname ) for confirmation... I think that i can use 2 labels and i am looking for code like
    Private Sub kinito_AfterUpdate()
    Label1.Caption =
    label2.caption =
    End Sub
    I am sorry. I do not understand what you are stating/asking here, or how it applies to what you quoted from me.
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •