Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combining fields on a form (2002)

    What is the best way to take two textboxes on a form FN and LN and combine them in another textbox LNFN that I can then save in the table that the form is based on.
    I realize that I don't really have to save the combined textboxes in a table as I can put them together anytime later but I'm working with an existing database that is based on a combined field in its table. I know how to combine the two fields [LN] & "; " & [FN] I am not sure the best way to save them in a textbox that uses LNFN as the table source.

    Thanks for the help.

    Paul

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Combining fields on a form (2002)

    You could put code in the After Update event of LN and FN:

    Private Sub LN_AfterUpdate()
    Me.LNFN = Me.LN & ", " & Me.FN
    End Sub

    Private Sub FN_AfterUpdate()
    Me.LNFN = Me.LN & ", " & Me.FN
    End Sub

    Each time the user modifies the value of FN or LN, the value of LNFN will be updated.

  3. #3
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combining fields on a form (2002)

    Thanks Hans- That worked.

    Paul

Posting Permissions

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