PC Review


Reply
Thread Tools Rate Thread

Add DAO Reference usin VBA.

 
 
ALESSANDRO Baraldi
Guest
Posts: n/a
 
      10th Apr 2004
Hi.
I need to create a new DB with DAO Reference.
So i need to set DAO(Last Version on Machine) and
uncheck ADO.

Thanks.

--
@Alex (Alessandro Baraldi)
---------------------------------------------------------------------------
http://www.sitocomune.com/
http://www.mantuanet.it/alessandro.baraldi/
---------------------------------------------------------------------------


 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      10th Apr 2004
Cao ALESSANDRO,
i think you can use automation to open your mdb with access, then use
references collection to add DAO reference and delete ADO
see online help for references collection for more info

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


"ALESSANDRO Baraldi" <(E-Mail Removed)> wrote in message
news:c57afg$v9b$(E-Mail Removed)...
> Hi.
> I need to create a new DB with DAO Reference.
> So i need to set DAO(Last Version on Machine) and
> uncheck ADO.
>
> Thanks.
>
> --
> @Alex (Alessandro Baraldi)
> --------------------------------------------------------------------------

-
> http://www.sitocomune.com/
> http://www.mantuanet.it/alessandro.baraldi/
> --------------------------------------------------------------------------

-
>
>



 
Reply With Quote
 
ALESSANDRO Baraldi
Guest
Posts: n/a
 
      10th Apr 2004

"Alex Dybenko" <(E-Mail Removed)> ha scritto nel messaggio
news:(E-Mail Removed)...
> Ciao ALESSANDRO,
> i think you can use automation to open your mdb with access, then use
> references collection to add DAO reference and delete ADO
> see online help for references collection for more info
>



Hi Alex, right i use Access Automation, i see on Help:

Dim ref As Reference
Set ref = References.AddFromFile(strNomeFile)
RiferimentoDaFile = True

I need to put in AddFromFile metod the Name of Reference File..!
Wich name i must put into it...?

For DAO i presume= dao360.dll
For ADO= msado15.dll

I need to retrive the SystemPath....where this Library are located...!!

Thanks Alex

I use this moment to give you and all NG People good Easter Day.

@Alex(Alessandro)


 
Reply With Quote
 
Alex Dybenko
Guest
Posts: n/a
 
      11th Apr 2004
Cao Alessandro,
to get SystemPath you can use this API function:
http://www.mvps.org/access/api/api0010.htm

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


"ALESSANDRO Baraldi" <(E-Mail Removed)> wrote in message
news:c58gbc$ina$(E-Mail Removed)...
>
> "Alex Dybenko" <(E-Mail Removed)> ha scritto nel messaggio
> news:(E-Mail Removed)...
> > Ciao ALESSANDRO,
> > i think you can use automation to open your mdb with access, then use
> > references collection to add DAO reference and delete ADO
> > see online help for references collection for more info
> >

>
>
> Hi Alex, right i use Access Automation, i see on Help:
>
> Dim ref As Reference
> Set ref = References.AddFromFile(strNomeFile)
> RiferimentoDaFile = True
>
> I need to put in AddFromFile metod the Name of Reference File..!
> Wich name i must put into it...?
>
> For DAO i presume= dao360.dll
> For ADO= msado15.dll
>
> I need to retrive the SystemPath....where this Library are located...!!
>
> Thanks Alex
>
> I use this moment to give you and all NG People good Easter Day.
>
> @Alex(Alessandro)
>
>



 
Reply With Quote
 
ALESSANDRO Baraldi
Guest
Posts: n/a
 
      11th Apr 2004

"Alex Dybenko" <(E-Mail Removed)> ha scritto nel messaggio
news:%(E-Mail Removed)...
> Cao Alessandro,
> to get SystemPath you can use this API function:
> http://www.mvps.org/access/api/api0010.htm
>
> --
> Alex Dybenko (MVP)
> http://Alex.Dybenko.com
> http://www.PointLtd.com



Ciao Alex Grazie.

Work perfect the DAO setting, but to Remove
ADO i have some problem.
I need to check if DAO are just set, but until i
don't remove ADO i have some difficulties because
the CODE don't have EXPLICIT DAO.OBJECT
declaretion......!!!

Hi.

Alssandro.


 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      12th Apr 2004
"ALESSANDRO Baraldi" <(E-Mail Removed)> wrote in message
news:c5bur3$s64$(E-Mail Removed)...
>
> "Alex Dybenko" <(E-Mail Removed)> ha scritto nel messaggio
> news:%(E-Mail Removed)...
> > Cao Alessandro,
> > to get SystemPath you can use this API function:
> > http://www.mvps.org/access/api/api0010.htm
> >
> > --
> > Alex Dybenko (MVP)
> > http://Alex.Dybenko.com
> > http://www.PointLtd.com

>
>
> Ciao Alex Grazie.
>
> Work perfect the DAO setting, but to Remove
> ADO i have some problem.
> I need to check if DAO are just set, but until i
> don't remove ADO i have some difficulties because
> the CODE don't have EXPLICIT DAO.OBJECT
> declaretion......!!!


To remove the ADO reference, try:

Dim refCurr As Reference

For Each refCurr In Application.References
If refCurr.Name = "ADODB" Then
Application.References.Remove refCurr
Exit For
End If
Next refCurr



--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)




 
Reply With Quote
 
ALESSANDRO Baraldi
Guest
Posts: n/a
 
      12th Apr 2004

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> ha scritto nel
messaggio news:%(E-Mail Removed)...
[CUT]
> To remove the ADO reference, try:
>
> Dim refCurr As Reference
>
> For Each refCurr In Application.References
> If refCurr.Name = "ADODB" Then
> Application.References.Remove refCurr
> Exit For
> End If
> Next refCurr
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (No private e-mails, please)



Thanks it's very easy, easier than what I thought....!

Alessandro(IT)


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Usin VB in Sql Server jschping Microsoft Access VBA Modules 7 30th Dec 2009 10:51 PM
istsvc.exe file usin 100% of CPU =?Utf-8?B?LS1JdmFuLS0=?= Windows XP General 2 29th Dec 2005 02:57 PM
Usin Or with IF statement =?Utf-8?B?UHVybmltYSBTaGFybWE=?= Microsoft Access Queries 2 16th Dec 2005 02:16 PM
re-install office xp by usin GPO Sarah G. Microsoft Windows 2000 Group Policy 2 18th Mar 2004 03:43 PM
Usin NetBeui Barbara Halsall Windows XP Networking 1 28th Jul 2003 12:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:42 PM.