Search results

  1. E

    Solved A Really Simple Question

    Oh yeah, but your form's bound, so you gotta disable stuff here, add guards there, fix this, fix that. Not exactly a high IQ move for a simple read-only feature. Honestly, it's like bringing a tank to a pillow fight. You don't need all that. Believe me. Look, you've seen bad implementations...
  2. E

    OpenArgs (my) class way

    You could use the Watch window, I use that thing all the time. 1. Add a watch 2. Write an expression such as Not myObj Is Nothing 3. Choose a procedure where myObj should be Nothing 4. Choose a module 5. Choose Break When Value Is True 6. Run your code, use your class or form or whatever and, if...
  3. E

    OpenArgs (my) class way

    I jumped in because there was a lot of esoteric speculation going on. The tools are available for everyone to use when figuring out when you need to set objects to "nothing". It’s certainly not about memorizing specific cases. That’s just my take on it, anyway, and, to clarify, apologies if I...
  4. E

    OpenArgs (my) class way

    You guys wouldn't have this discussion if you used more debugging tools than just the immediate window
  5. E

    Closing image viewing software

    I agree, Photos.exe is not there. Looking further, I found this: Then I looked that ProgId up using the find tool and it took me here: When I switch defaults to Firefox, it showed Applications\firefox.exe So, there could be some information here. I can't conclude this is the right way...
  6. E

    Closing image viewing software

    @sonic8 I was referring to this key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts
  7. E

    Closing image viewing software

    There is a registry key in the Current User tree where you can get the name of the app that opens a certain file extension. Whatever is in the "a" key returns it. With that you could scan the processes running or their command line argument and if there is a match, you could then explore their...
  8. E

    Solved A Really Simple Question

    Of course, you have the benefit of just fetching the data that needs to be displayed and have nothing else going on. Well, in network scenarios, losing connectivity can lead to data corruption and may cause Access to crash. If your app is open for a long time, losing access to the network could...
  9. E

    Database Properties - Did you know

    Maybe write an Enum of the possibilities and unify the methods, because the syntax may differ: Some expect a string, others a Property object. Oh, Thanks for the CC bucks :geek:.
  10. E

    Double Click cell inserts Today's Date

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Not Intersect(Target, Range("E:E")) Is Nothing Then If Target.Row >= 3 Then Cancel = True Target.Value = Now() End If End If End Sub
  11. E

    Database Properties - Did you know

    Forgot to post this too Function ccSetCustomProperty(strDbName As String, strPropName As String, intPropType _ As Integer, strPropValue As Variant, tblName As String) As Integer Dim dbs As DAO.Database, cnt As DAO.Container Dim wsp As DAO.Workspace Dim prp As DAO.Property Dim tbl...
  12. E

    Database Properties - Did you know

    Try this, expect bugs, I couldn't test Function ccGetCustomProperty(strDbName As String, strPropName As String, tblName As String) As Variant Dim dbs As DAO.Database, cnt As DAO.Container Dim wsp As DAO.Workspace Dim doc As DAO.Document, prp As DAO.Property, tbl As TableDef Const...
  13. E

    Database Properties - Did you know

    I see that your functions are doing this, essentially: DBEngine.Workspaces(0).Databases(0).Containers("Databases").Documents("UserDefined").Properties.Append But your functions perform checks and let the user choose the objects to work with. I'd say it's the same methodology. Post #13, where...
  14. E

    Database Properties - Did you know

    According to the object browser, you can't add properties to controls. But I don't think that prevents us from adding them in some other way, with a class or something else. I didn't test adding the property, I just checked this:
  15. E

    Database Properties - Did you know

    I recall having used the count of properties somewhere to determine the kind of thing I'm dealing with, so yes, that and other things are mutating as we use them. For example, I created an unbound form with nothing in it: properties count is 250. Now I created a bound form with stuff...
  16. E

    Database Properties - Did you know

    An example of how to set a property for a database and how it appears in the debugger. Posted because because you wrote this: Multiple things allow adding properties. It can be checked with the object browser by searching "properties" as search term. I can see the following, as examples...
  17. E

    Database Properties - Did you know

    You mean something like this? Sub asdasd() Dim prop As Object Set prop = CurrentDb.CreateProperty("CustomProp", 1, False) CurrentDb.Properties.Append prop End Sub
  18. E

    Solved Create several MergeField by VBA

    Recuerdo que hablas español. ¿Entonces tienes campos vacíos en la columna izquierda? Si es así, ¿Qué quieres hacer con esos campos? 1. Asignarles un nombre genérico 2. Ignorarlos y pasar al siguiente
  19. E

    Solved Create several MergeField by VBA

    If I understood correctly, you have one table with two columns. First column has the names of the merge fields Second column must have the merge fields If so, try the following: Sub AddFields() Dim t As Table Set t = Application.Documents(1).Tables(1) Dim i As Long For i =...
  20. E

    ACE model request

    May I suggest you simply go ahead and do the following? 1. Open the VBA IDE 2. Go to View > Watch Window 3. Right click > Add watch 4. Write "application" in the expression input box and keep procedure and module to "All Procedures" and "All Modules", respectively 5. Expand the resulting...
Back
Top Bottom