Results 1 to 5 of 5
  1. #1
    tariq1 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    May 2012
    Posts
    16

    After Update/concatenation not functioning

    Hi,

    Firstly, thank you for your help on this.
    The following code should call a concat function whenever there is an Update to one of three List Boxes
    and the text box should show the concatenated value, but nothing seems to occur...




    Code:
    Private Sub List14_AfterUpdate()
    Call concat
    End Sub
    Private Sub List16_AfterUpdate()
    Call concat
    End Sub
    Private Sub List18_AfterUpdate()
    Call concat
    End Sub
    
    Private Sub concat()
    Me.Text20 = Me.List14 & Me.List16 & Me.List18
    End Sub

  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
    You can set a breakpoint or throw a message box in there to see if it's running. The breakpoint would also let you examine the values. If the list boxes are multiselect, they will return a Null to the text box.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Try:
    Code:
    Private Sub List14_AfterUpdate()
    Call concat
    End Sub
    Private Sub List16_AfterUpdate()
    Call concat
    End Sub
    Private Sub List18_AfterUpdate()
    Call concat
    End Sub
    
    Debug.Print Me.List14 
    Debug.Print Me.List16 
    Debug.Print Me.List18 
    Private Sub concat()
    Me.Text20 = Me.List14 & Me.List16 & Me.List18
    End Sub
    Then take a look in the immediate window to see what the values were when the code ran.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Seems to work fine for me. Might be a silly question, but are you sure that Macros/VBA are enabled on your database?

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    And that the file is in a 'trusted' location? Nothing silly about asking that when dealing with 2007/2012! I've seen three problems, solved by asking that question, this morning!

    In line with that, does any code you have run, anywhere in this database?

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. After Insert macro not functioning
    By scottnew2ac in forum Access
    Replies: 2
    Last Post: 07-26-2012, 09:25 AM
  2. DLookup not functioning correctly - any ideas please?
    By shabbaranks in forum Programming
    Replies: 2
    Last Post: 02-02-2012, 09:09 AM
  3. Runtime error not functioning A2007
    By gg80 in forum Programming
    Replies: 11
    Last Post: 09-04-2010, 01:24 PM
  4. Query and Concatenation
    By Try2Live4God in forum Programming
    Replies: 2
    Last Post: 05-25-2010, 03:45 PM
  5. Concatenation Urgent Help
    By Shoaib in forum Queries
    Replies: 0
    Last Post: 04-23-2009, 11:02 PM

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