Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 15th, 2005, 01:18 PM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to vrtviral
Default Dao to Ado

Hi friends,

I am converting an access 97 database to access 2000.
I have a problem in it.
in access 97 the properties of the forms were available throught the document object.
but in access 2k i could not find a way to retrieve the properties of the form. I need DateModified and DateCreated properties of the form

These properties are available in acess 2002.

looking forward to your help.

Thanking you,
Viral

Reply With Quote
  #2 (permalink)  
Old February 15th, 2005, 10:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Is it possible that you simply didn't set a reference to the DAO object library (which includes the Document object) in your 2k db. DAO is the default MDAC library in 97, ADO is the default MDAC library in 2K. ADO doesn't have a document object, so the DAO reference needs to be set manually.

Bob

Reply With Quote
  #3 (permalink)  
Old February 16th, 2005, 01:29 PM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to vrtviral
Default

thanks a lot for your reply Bob. but the problem is that we do not need to use DAO in our project.
is it possible retrieving those properties without using document object of DAO

Reply With Quote
  #4 (permalink)  
Old February 16th, 2005, 08:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Hi Viral,

I can't remember if the AccessObject object was a programmability enhancement with A2K or A2K2, but it should give you waht you need. The following loops through your project's Forms collection, printing the date created and date modified of each form:

Sub FormProperties()

    Dim objForm As AccessObject

    For Each objForm In CurrentProject.AllForms
        With objForm
            Debug.Print .Name & " - Created " & .DateCreated _
                & " - Modified " & .DateModified
        End With
    Next objForm

End Sub

Output:

Form1 - Created 2/16/2005 7:21:39 PM - Modified 2/16/2005 7:21:40 PM
Form2 - Created 2/16/2005 7:21:50 PM - Modified 2/16/2005 7:21:50 PM

HTH,

Bob

Reply With Quote
  #5 (permalink)  
Old February 16th, 2005, 08:46 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

If my previous post turns out to be A2K2 stuff (and I have a hunch it might be), you can query the MSysObject system table for object properties in any version of Access. To get the Form properties you need from the system table, run:

SELECT Name, DateCreate, DateUpdate
FROM MsysObjects
WHERE (((Left$([Name],1))<>"~") AND ((MsysObjects.Type)=-32768))
ORDER BY MsysObjects.Name;

HTH,

Bob

Reply With Quote
  #6 (permalink)  
Old February 19th, 2005, 11:13 AM
Registered User
 
Join Date: Feb 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to vrtviral
Default

hi bob,

thanks a lot for your help. your suggestions were very useful.
sorry, i m just discussing off topic..
can u tell me where r u from . r u a programmer?
i m from india

Thanks...
bye
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADO or DAO knowledge76 Access VBA 3 October 12th, 2015 04:26 PM
DAO vs. ADO SerranoG Access VBA 11 December 5th, 2006 01:19 PM
ADO - DAO compatability petermat Access VBA 6 January 10th, 2006 06:06 PM
ADO vs DAO perrymans BOOK: Expert One-on-One Access Application Development 0 October 24th, 2004 11:36 PM
DAO / ADO? merguvan Access VBA 8 January 18th, 2004 07:39 AM



All times are GMT -4. The time now is 11:55 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.