Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Vita's Avatar
    Vita is offline Competent Performer
    Windows 10 Access 2002
    Join Date
    May 2022
    Location
    Massachusetts, USA
    Posts
    296


    Quote Originally Posted by twgonder View Post
    Here's an example:

    Attachment 49759
    are there other languages that can do this?

  2. #17
    Vita's Avatar
    Vita is offline Competent Performer
    Windows 10 Access 2002
    Join Date
    May 2022
    Location
    Massachusetts, USA
    Posts
    296
    Any other good practices I should learn? Does anyone know of a massive forum post or a site somewhere that covers a ton of good practices?
    Bad practices are also worth mentioning! I appreciate any advice!
    Keyboard tricks are also useful. I am used to using home and end but it took me a while to discover Ctrl + arrow key.

  3. #18
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,002
    I prefer the concatenation method, I have come across the 25 line limitation a couple of times in a very wide database table, and I like to see everything on the screen, even with three 24" monitors, so I tend to keep the lines lengths sensible.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #19
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,973
    Quote Originally Posted by Vita View Post
    Oh my god this is a life saver if this works. I will definitely try it.
    Its been downloaded several thousand times without any complaints
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #20
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Unless data can have apostrophes (e.g., O'Hara), apostrophe should work as well as doubled quotes.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #21
    twgonder is offline Expert
    Windows 10 Access 2021
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658
    Quote Originally Posted by Vita View Post
    are there other languages that can do this?
    I don't know. I worked with line editors for too many years. I once had a programmer put his entire 500+ statement program on a single line. I think he was trying for job security. That plan didn't work out too well for him. If he hadn't written all his variables in Chinese, I may have given him a second chance.

  7. #22
    twgonder is offline Expert
    Windows 10 Access 2021
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658
    Quote Originally Posted by Vita View Post
    I have had to do this quite a few times manually on this current project and have gotten good at recognizing the mistakes I make and continuing it onto the next line.

    What I have gathered from this conversation is that line continuation has a limit of 25 continuations but is more optimized and creates less "garbage collection"(in memory I presume) so it is technically faster but only on code that would be repeating a lot.
    While Variable concatenation(I don't know the technical name for this form of concatenation so I just came up with this) can get around this limit.
    The readability is whatever the user prefers/finds easier.
    If you've done assembly programming, then you think more in terms of what the processor and registers have to do. In simple terms, if you have a = a & b & a, then the final code has to take a and b and put them both in a new memory space, then add the original a again to the new space, then (depending on optimization) it may move all that back into a new space (because it doesn't know beforehand that you want to put it in a and not perhaps d or some other operation) then reassigns a to that new space, then has to clean up (or reuse depending on size) the space used for the original a and b, and the next to last a&b&a area.

    I had a new programmer doing a custom index program for hundreds of thousands of records (which created huge strings). We fired it off and went home. In the morning it was only 20% complete. Changing a few lines of his code made the program complete its task in less than an hour, during the day when 40+ users were on the system. At first glance of the BASIC code, you wouldn't think the changes would make that much difference, but they did for what the processor had to do with those large strings.

  8. #23
    Vita's Avatar
    Vita is offline Competent Performer
    Windows 10 Access 2002
    Join Date
    May 2022
    Location
    Massachusetts, USA
    Posts
    296
    Quote Originally Posted by twgonder View Post
    If you've done assembly programming, then you think more in terms of what the processor and registers have to do. In simple terms, if you have a = a & b & a, then the final code has to take a and b and put them both in a new memory space, then add the original a again to the new space, then (depending on optimization) it may move all that back into a new space (because it doesn't know beforehand that you want to put it in a and not perhaps d or some other operation) then reassigns a to that new space, then has to clean up (or reuse depending on size) the space used for the original a and b, and the next to last a&b&a area.

    I had a new programmer doing a custom index program for hundreds of thousands of records (which created huge strings). We fired it off and went home. In the morning it was only 20% complete. Changing a few lines of his code made the program complete its task in less than an hour, during the day when 40+ users were on the system. At first glance of the BASIC code, you wouldn't think the changes would make that much difference, but they did for what the processor had to do with those large strings.
    I haven't done much assembly but I kind of think like that anyways. I wish I worked at a job that paid me to learn newer coding languages. Unfortunately after this project there isn't much more they need coding for.
    I try to optimize stuff as much as possible because I like speed. I am thinking of learning C++ but I have been told other languages are in greater demand.

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

Similar Threads

  1. Replies: 4
    Last Post: 08-22-2017, 07:14 PM
  2. Replies: 1
    Last Post: 11-11-2014, 03:54 PM
  3. Replies: 10
    Last Post: 06-10-2014, 09:03 AM
  4. Replies: 3
    Last Post: 08-16-2011, 02:20 PM
  5. Replies: 6
    Last Post: 04-07-2011, 12:33 PM

Tags for this Thread

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