DAO and ADOBD

fatboy95

Registered User.
Local time
Today, 14:38
Joined
Apr 2, 2002
Messages
43
Can these be used in the same database on different functions or do I have to use the same type of connection to the database throughout?

Thanks
 
As long as you set a reference to both libraries, and reference their objects explicitly then you can use both in the same database.
 
Not sure if this is correct then. I am using this on one button
Dim s As String
Dim db As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim rsFind As New ADODB.Recordset
Dim Icount As Double
Dim Rcount As Double

Dim MissileID As Double
Dim NewPartName As String


'Open db connection
Set db = CurrentProject.Connection

and then this is what is on another part. It is from Lebans calender program
found here http://www.lebans.com/monthcalendar.htm

Private Function GetProperty(ByVal strPropName As String, ByRef strPropValue As Variant) As Boolean
' Changed strPropValue as String to as Variant

Const cProcedureName As String = "GetProperty"
On Error GoTo Err_Handler
Dim db As DAO.Database

Set db = CurrentDb
strPropValue = db.Properties(strPropName)
GetProperty = True

I am not real quick with VBA so not sure if it correct.

When I copy what I need from one database into another it gives me

"Compiler Error:"
USER DEFINED-TYPE NOT DEFINED

I am sure I am not referencing it correctly but not sure how to either.
Thanks for the help.
 
All the information above this post is if I import all my database info into the calender program and the below information is if I import the information from the calender database I get an error from this line

" SetProperty "MultiSelect", dbLong, m_MulitSelect "

saying that dbLong is a varable not defined.

I am really confused as what the problem is.
 
Thank you very much.. the reference to DAO 3.6 library was my problem... I must say this forum has been the biggest help...
 

Users who are viewing this thread

Back
Top Bottom