Search results

  1. S

    Disable SQL Automatic Code Formatting

    Hello again! Nice to be back on the forum. This might be a very simple question but has anyone else noticed in the SQL view that Access is now automatically inserting some indentation and line breaks. I was curious if there's a way to disable this. I didn't see anything in the Options->Object...
  2. S

    How to Hide Queries Using VBA

    Not sure if this is just a unique quirk of mine, but 99% of the time I need to use SQL I do it all in VBA modules using strings. 'For simple things I just type the string out: Dim rs as Recordset Set rs = CurrentDB.OpenRecordset("SELECT * FROM Parties WHERE Full_Name IS NOT Null") ' Or maybe...
  3. S

    Should my code embrace more of the "Single Responsibility Principle"?

    Update on the promise to try out what MarkK has suggested, I created my first event system in VBA today on a blank database. Created a class module, learned to use a function to create a "Singleton Instance" of said class that can be accessed throughout my code by running said function. Then, I...
  4. S

    Should my code embrace more of the "Single Responsibility Principle"?

    You make some excellent points for why I'd want to do it that way. I'll definitely have to look into doing that. It would be the first service class implemented in this codebase so far, but there are probably a lot of other times it would've helped. If it goes well it might just cause a...
  5. S

    Should my code embrace more of the "Single Responsibility Principle"?

    Hi everyone, I just wrote some code to properly delete one of my data types from the database I'm working on. I originally came up with the need for it when I realized that when a record from this particular table (the "Links" table) gets deleted, the code should also check for records...
  6. S

    Two ways to access controls on other forms

    Appreciate your responses everyone, Looks like there are a lot of ways to do this. I definitely don't prefer the bang notation as it turns out to be called, but I see the merit in the case MajP suggested where a form's record source only gets set a runtime and therefore the fields can't be...
  7. S

    Two ways to access controls on other forms

    Hi everyone, I learned that I can use two methods to access controls on other forms from outside their respective modules. I was curious if one or the other is considered best practice so I decided to pick the brains of the community here. I should preface that with either approach, I always...
  8. S

    OOP in Access Applications

    I think I see what you're saying. You can't exactly compare Access to other general purpose languages and environments. Access is more focused on a certain kind of application and comes with a lot of prebuilt components to help you quickly assemble that kind of application. It would be a shame...
  9. S

    OOP in Access Applications

    Very true, luckily I did learn those but nothing else. Well, I learned the absolute minimum to get them running VBA so I could ditch whatever other scratch-like language they were using 😅
  10. S

    OOP in Access Applications

    First off, I appreciate all the responses! I'm glad that a variety of views on this subject ended up being posted here in response to my kind of impulsive, not super well thought out question. To all of you who pointed out that this is a very simple problem to solve and does not deserve a...
  11. S

    OOP in Access Applications

    Hi everyone, I have more of a theoretical question today, I'm mostly looking for inspiration on how I might be able to take advantage of the OOP paradigm in the application I'm working on. I guess the general and very open ended question I have is this: "Can I have some examples from fellow...
  12. S

    Solved Weird Visual Bug in my Code that Conditionally Hides Columns

    Interesting, I didn't end up needing to do that with my current system. I'm using controls in a layout, so by toggling one column, all of the columns to its right will automatically slide to the left. It turns out the reason for my weird gap was simply that not everything was anchored the same...
  13. S

    Solved Weird Visual Bug in my Code that Conditionally Hides Columns

    Thanks for the resources! I'll be sure to check them out. I actually happened on one of your articles / videos showing this kind of thing is possible which is what sparked the whole idea for this in the first place, so it's kinda cool that you ended up replying to this thread. But yeah, I'll...
  14. S

    Solved Weird Visual Bug in my Code that Conditionally Hides Columns

    I was gonna try adding the borders, but first I made sure everything was anchored top left, and now the gap isn't showing up anymore. Appreciate your suggestions!
  15. S

    Hi, Introducing myself

    Welcome!
  16. S

    Solved Weird Visual Bug in my Code that Conditionally Hides Columns

    Hi Everyone, I wanted to pick your brains if you don't mind on an issue I'm having with one of my forms. A key characteristic of the form I'm creating is that it will conditionally show / hide / resize / relabel columns based on data that gets passed to one of it's subroutines. Any help or...
  17. S

    Is Manual Memory Management Necessary in Modern Day Access? When Does Garbage Collection Occur?

    Oh I see. I thought the recordset.close method caused the memory to be de-allocated, but really, all it does is remove the recordset's internal pointer to that memory, in the same way setting a recordset variable to nothing removes the pointer to the memory used by that recordset object. Is that...
  18. S

    Is Manual Memory Management Necessary in Modern Day Access? When Does Garbage Collection Occur?

    Hi all, I was wondering if I could get some of your opinions on whether explicit memory management in VBA code is a good practice / necessary in modern day VBA. Here's my current understanding, please correct me where I'm wrong. When an object, such as a recordset, goes out of scope, that is...
  19. S

    Why "Me."?

    So true honestly. I like how they named the language after the comedy group but this one was less funny XD
Back
Top Bottom