Results 1 to 2 of 2
  1. #1
    Nobby2193 is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2012
    Posts
    12

    concatenate fields in a subform to a field in my mainform

    Hi
    I am trying to get the code working to lookup all records in [town] in my sub form and then concatenate them into a single field on my main form [Areas]

    example


    Mainform
    Name FrmDailyReport
    Field named [Areas ]
    combo box named [datedcbo] which looks up dates ( in a table named TblVisits and a field named [VisitDate] (SELECT DISTINCT TblVisits.VisitDate FROM TblVisits ORDER BY TblVisits.[VisitDate]

    Subform
    Name FrmDailyReport_sub
    control is QryDailyReport
    the fields are [ID], [Company] [Town] [Visitdate]
    so if
    record 1 [town] was Glasgow and
    Record 2 [town] was Gillingham and
    Record 3 [town] was Canterbury

    I would expect to see My Mainform [Areas] show Glasgow, Gillingham ,Canterbury

    Please can anybody help

  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
    Try Allen's function in a textbox:

    http://allenbrowne.com/func-concat.html
    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. Replies: 1
    Last Post: 03-22-2015, 02:21 PM
  2. Replies: 1
    Last Post: 11-07-2012, 05:31 PM
  3. Replies: 4
    Last Post: 03-30-2012, 01:47 AM
  4. Replies: 1
    Last Post: 11-29-2011, 01:37 AM
  5. Concatenate two fields (text & number) for key field
    By Larry Elfenbein in forum Forms
    Replies: 2
    Last Post: 11-10-2005, 07:45 AM

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