Results 1 to 15 of 15
  1. #1
    3 Star Lounger
    Join Date
    Feb 2001
    Posts
    369
    Thanks
    2
    Thanked 1 Time in 1 Post

    MSysObjects help (2000 sr1a)

    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!!!

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MSysObjects help (2000 sr1a)

    Take a look at <A target="_blank" HREF=http://www.elementkjournals.com/ivb/0004/ivb0041.htm>http://www.elementkjournals.com/ivb/0004/ivb0041.htm</A> and see if that helps.
    Charlotte

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: MSysObjects help (2000 sr1a)

    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.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  4. #4
    3 Star Lounger
    Join Date
    Feb 2001
    Posts
    369
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: MSysObjects help (2000 sr1a)

    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 - <A target="_blank" HREF=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdcstschemaenum.asp>http://msdn.microsoft.com/library/default....tschemaenum.asp</A>

    Thanks

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: MSysObjects help (2000 sr1a)

    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?
    Charlotte

  6. #6
    3 Star Lounger
    Join Date
    Feb 2001
    Posts
    369
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: MSysObjects help (2000 sr1a)

    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?

  7. #7
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: MSysObjects help (2000 sr1a)

    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.
    Wendell

  8. #8
    3 Star Lounger
    Join Date
    Feb 2001
    Posts
    369
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: MSysObjects help (2000 sr1a)

    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!

  9. #9
    3 Star Lounger
    Join Date
    Feb 2001
    Posts
    369
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: MSysObjects help (2000 sr1a)

    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.

  10. #10
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: MSysObjects help (2000 sr1a)

    Check out article <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/Q165/4/37.asp?LN=EN-US&SD=gn&FR=0&qry=ActiveX&rnk=22&src=DHCS_MSPSS_gn _SRCH&SPR=ACC97>Q165437</A> - 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.
    Wendell

  11. #11
    3 Star Lounger
    Join Date
    Feb 2001
    Posts
    369
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: MSysObjects help (2000 sr1a)

    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?

  12. #12
    3 Star Lounger
    Join Date
    Feb 2001
    Posts
    369
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: MSysObjects help (2000 sr1a)

    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.

  13. #13
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: MSysObjects help (2000 sr1a)

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

    Microsoft MVP - Excel

  14. #14
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: MSysObjects help (2000 sr1a)

    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.
    Wendell

  15. #15
    3 Star Lounger
    Join Date
    Feb 2001
    Posts
    369
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: MSysObjects help (2000 sr1a)

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •