Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    FYI,
    the colon ":" is a line continuation token left over from the BASIC language. (back in the ancestral time of computers - the IBM XT )
    It is still in VB/VBA for backward compatibility, but it has been depreciated.

    This code
    Code:
    Private Sub txtQtyOfBackOrderReceived_AfterUpdate()
       If IsNull(Me.BackOrderReceived) Then
          [txtBackOrderReceived] = [txtQtyOfBackOrderReceived]
       Else   '<<-- notice no colon
          Me.txtBackOrderReceived = [txtQtyOfBackOrderReceived] + [txtBackOrderReceived]
        End If
    End Sub
    will still execute if written like


    Code:
    If IsNull(Me.BackOrderReceived) Then:[txtBackOrderReceived] = [txtQtyOfBackOrderReceived]:Else:Me.txtBackOrderReceived = [txtQtyOfBackOrderReceived] + [txtBackOrderReceived]:End If
    BUT it is sooooo much harder to read.

    The point being, it doesn't hurt anything, but you don't/shouldn't use it. Never know when MS will remove it from VB/VBA.

  2. #17
    ShaunG is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    237
    Quote Originally Posted by ssanfu View Post
    FYI,
    the colon ":" is a line continuation token left over from the BASIC language. (back in the ancestral time of computers - the IBM XT )
    It is still in VB/VBA for backward compatibility, but it has been depreciated.

    This code
    Code:
    Private Sub txtQtyOfBackOrderReceived_AfterUpdate()
       If IsNull(Me.BackOrderReceived) Then
          [txtBackOrderReceived] = [txtQtyOfBackOrderReceived]
       Else   '<<-- notice no colon
          Me.txtBackOrderReceived = [txtQtyOfBackOrderReceived] + [txtBackOrderReceived]
        End If
    End Sub
    will still execute if written like
    Code:
    If IsNull(Me.BackOrderReceived) Then:[txtBackOrderReceived] = [txtQtyOfBackOrderReceived]:Else:Me.txtBackOrderReceived = [txtQtyOfBackOrderReceived] + [txtBackOrderReceived]:End If
    BUT it is sooooo much harder to read.

    The point being, it doesn't hurt anything, but you don't/shouldn't use it. Never know when MS will remove it from VB/VBA.
    yeah right thanks for that, ive got it in other codes as well so ill get rid of it.. im pretty sure ms inserted it itself otherwise I wouldn't of known to use it lol

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Stop executing code when Form opens
    By Joakim N in forum Programming
    Replies: 3
    Last Post: 01-04-2017, 06:09 AM
  2. Problems updating a customer details
    By shaunacol in forum Forms
    Replies: 9
    Last Post: 07-13-2015, 11:26 AM
  3. Graph on Form - Overriding data
    By Gabriel2012 in forum Forms
    Replies: 6
    Last Post: 02-19-2013, 10:18 AM
  4. Replies: 9
    Last Post: 04-11-2011, 10:55 PM
  5. Computer1 Form Current Record opens on Computer2
    By joefonseca79 in forum Forms
    Replies: 2
    Last Post: 02-20-2011, 04:11 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