Results 1 to 5 of 5
  1. #1
    ExcessionOCP is offline Advanced Beginner
    Windows 11 Office 365
    Join Date
    May 2023
    Posts
    31

    Rewriting a "developed in tandem with learning" database application

    Hi All,



    Bit of a philosophical question here. I have been working on an Access system for a number of months now, and what started out as quite a basic system has become (for me) quite complex and feature-packed. I have been learning as I go, and the system now is written in a more logical, efficient way but is definitely built on a bit of a house-of-cards with uncommented VBA, badly-written queries and inconsistent naming conventions and very little in the way of error-checking and error-handling.

    So, I'm thinking that I could spend a quiet weekend restarting from scratch and redeveloping the system. Is this a good idea? My main concern is that I have probably forgotten why or how I did things in the early days, but I think that even if I have, I can redevelop it in perhaps a more efficient, robust manner.

    Also, my application is currently a mixture of VBA SQL functions as well as "stored" queries (designed in the query designer and saved in the main application). Does anyone have any view on which is better? Is it better to have all VBA functions and no stored queries? Or all stored queries and no VBA functions?

    Thanks in advance for any guidance that you gurus can offer this jack-of-all-trades, master of none.

    Cheers,

    Phil

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    Use what is right for the job. Sometimes better to use queries, sometimes better to use sql constructed in vba. I tend to favour the latter as I develop for clients and I don’t want to tempt them to change a query or delete by accident which is possible with a .accde.

    Some will say the vba approach is slower because of the overhead of creating a query plan. However that time is minimal with modern computers. Plus a query plan does not reoptimise as tables get longer. So a query developed on a relatively small dataset (as used during testing) might be different if created on much larger tables. But i emphasise the time difference is very small

  3. #3
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    So, I'm thinking that I could spend a quiet weekend restarting from scratch and redeveloping the system.
    My quiet weekend is going on about 10 years or so now. I couldn't even guess how many times I've written and re-written my main
    app that I use for work everyday. Each time you learn something new or a more efficient way of doing something it's back to a re-write of something.
    It's a never ending process, IMO.

    I have one colleague in another office who swears by an app I wrote way back when. When I look at what I wrote back then I cringe.
    I've offered to upgrade him numerous times but nope he wont do it, it's almost embarrassing to have it out there.
    I may lie to him and tell him the runtime version he's using has exceeded its end of life and will stop working.

    I say go for it. You'll enjoy it and learn even more. Just plan on your quiet weekend being a little extended.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  4. #4
    ExcessionOCP is offline Advanced Beginner
    Windows 11 Office 365
    Join Date
    May 2023
    Posts
    31
    Haha! I can totally see myself in the same position as you within a few years! I love learning different and (sometimes!) better ways to do things.

    To be honest, developing the system is way more interesting to me than using it. I am about to roll it out to a couple of colleagues though, which has focused my attention on the lack of error handling and recovery - I know what to do to not break things, but no-one else will, and I'm sure they will break it in the first 5 minutes.

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    I agree with the comments above. As for queries vs vba sql I also think it depends on how volatile you think the query design may be (not talking about parameters here). It's easier to add/remove fields as an example, in a query than it is to re-write the vba generated sql for it. It's also easier to hide sql from nosy users if it's all in code that they can't get to. I'd lean towards vba if my project was for sale.

    In case any of my usual links would help with your redesign project, here's a link (see post 15).
    https://www.accessforums.net/showthread.php?t=87892
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 10
    Last Post: 08-08-2019, 11:05 AM
  2. Learning VBA - specifically "Hello, world!"
    By AishlinnAnne in forum Programming
    Replies: 10
    Last Post: 08-29-2016, 06:51 AM
  3. Replies: 3
    Last Post: 06-22-2016, 01:32 AM
  4. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  5. Replies: 1
    Last Post: 03-14-2013, 12:39 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