• MSysObjects help (2000 sr1a)

    Author
    Topic
    #362059

    Having had no joy with finding an inexpensive utility for comparing Access 2000 databases, I started having a look myself. I am baffled by the dates and times in MSysObjects, however. For all the objects, the date created is the same as the date updated, and the date updated is earlier than the date of certain documented changes to an object. Exactly what do these dates refer to, and which updates will and will not be marked. It soon became clear that just because all the objects in 2 databases have the same value for DateUpdated does not mean the databases are the same.

    I’m very disappointed that having bought the big books now the answers aren’t in there!!!

    Viewing 2 reply threads
    Author
    Replies
    • #549013

      Take a look at http://www.elementkjournals.com/ivb/0004/ivb0041.htm and see if that helps.

      • #549067

        Thank you as ever, Charlotte,

        Now, if only I could get it to work!! For some reason am getting a typemismatch for passing the treeview control. Have you ever tried using them. All the correct references are there, and I’ve tripled checked spellings etc, but still getting type mismatch error. Hmmm. Lack of documentation doesn’t help.

        I’ll also need to play around with the schemas specified to get what I want (I need to compare forms and reports and everything). Do you know where the OpenSchema parameters are documented? Ah – just found something on this, though it doesn’t look complete – http://msdn.microsoft.com/library/default….tschemaenum.asp

        Thanks

        • #549092

          Try using the object browser and searching for OpenSchema.That will show you the syntax and selecting the object and pressing F1 should bring up the help topic for the OpenSchema method. Were you looking for something more?

          • #549180

            As usual, I seem to have the poor relation of html help files – I had to search out and load the ado and dao help files into my system directory before I could access those, and now I am having the same blank help screen each time I try to find any help on the Treeview control. As it was, I was looking for something more (the meanings in lowly Mark speak of the querytype parameter values), but I did find some information on this in the MSDN library. I am still no wiser, however, as to why this:

            Dim trvVar As TreeView
            Set trvVar = Me!tvDatabase1 ‘the name of the MS TreeView Control V6.0 on the form of which this code is part of a ButtonOnClick routine

            should produce a type mismatch error.

            Any thoughts?

            • #549229

              In order to use the TreeView control, you need to set a reference to the Windows Common Controls OCX file. This should be located in your System or System32 directory, and is called mscomctl.ocx. You may want to search for it just to make sure it got installed. As to help, since it’s an ActiveX object, you will need to download documentation from the Microsoft web site. Do a search in the Knowledge base for Treeview. Hope this helps.

            • #549258

              Thanks Wendell, but I’d already checked that this reference was there (and moved it up the list just to make sure). My understanding was that I wouldn’t have been able to put the control on the form in design view without this reference. So, the problem is not finding the treeview control or putting it on the form, but that the treeview control is apparently not the same thing as a TreeView (object?) variable in VBA. At least that’s what I thought a Type Mismatch error meant.

              I haven’t found much joy with the help either. I’ve already done a thorough knowledge base search, without finding anything to help me, and as for help, the most useful error message I get is that MSDN is not installed, when I try and access help from the TreeView Control – Properties window. Tried searching the MSDN downloads section without joy. Have also tried looking in MSDN library for help with this problem, and found nothing.

              Feeling v stupid!

            • #549263

              Thanks Wendell, but i’d already done that, and moved it up the list just in case. My understanding was that I wouldn’t have been able to put it on my form in the first place if the reference hadn’t been there. My problem remains that a Treeview control is apparently mismatched with an (object?) variable declared in vba as treeview. And this is not my code – but from someone (magazine suggested by Charlotte) who I would have thought would know what they’re talking about.

              Extensive search of both MSDN and KB unhelpful, except to note that nowhere in any code is the treeview variable declared – only the nodes seem to be declared. spooky.

              I think I’ll try just declaring it as an object and see what happens.

            • #549326

              Check out article Q165437 – it includes a sample database that shows you how to use the various ActiveX controls with Access97 – I don’t think there is a comparable one for Access2K – and the download includes a readme file that talks about how to use TreeView controls. It hasn’t changed between Access 97 and 2000, though with 2000 you want to use mscomctl.oxc rather than comctl32.ocx. Hope this helps.

            • #549378

              Thanks Wendell,

              I solved my problem (although have not satisfied my curiosity) by declaring it as object, not TreeView. What on earth the variable type TreeView (selected from helpful drop down list following Dim trvVar As..) is if it’s not a Treeview control I don’t know. Interestingly everything in the code in the ActiveX example DB you pointed me towards is declared as object, even the nodes (declared as Node in most other Treeview code I’ve seen).

              Anyway, thanks for the help.

              Just out of interest, does anyone know the answer to my first question: what determines the dateupdated date for an object in MSysObjects?

            • #555712

              Hi Mark,
              This may be a bit late but have you tried:
              Dim trvVar As TreeView
              Set trvVar = Me!tvDatabase1.Object
              Hope that helps.

            • #555821

              Thanks Rory, that’s what I did in the end.

              BTW, is there any difference in the resource usage or handling of:

              Dim trvVar As TreeView
              Set trvVar = Me!tvDatabase1.Object

              and

              Dim trvVar As Object
              Set trvVar = Me!tvDatabase1

              or similar with another type of object. Are there parallels with using variants, or are there properties you can access with one method but not the next, or is it just about neatness and readability (in which case I’d better start with my handwriting)?

              Thanks

    • #549057

      I’ve had good success with the MDBDiff utility from http://www.pb-sys.com/ The web site lists this software as “retired”, but it is still available. I’ve used only the Acc97 version, but A2K is also available.

    • #555695

      Half the answer to my question was that apparently when A2000 compacts, the dates of all items are changed to that date. Doesn’t explain why the date updated doesn’t reflect subsequent updates, though. Still working on that one.

      • #555753

        Yes – that’s an unfortunate thing they did in Access 2000 – most annoying to me, but not much you can do about it. To the best of my knowledge neither SR1 or SP2 fix the problem either. I just tried Access 2002, and it seems not to change anything but modules. BTW, I believe 2000 SP1 won’t change the date of tables or queries, but does all other objects.

    Viewing 2 reply threads
    Reply To: MSysObjects help (2000 sr1a)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: