Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / August 2006

Tip: Looking for answers? Try searching our database.

i cant find CurrentProject.Path help!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
macken09@gmail.com - 30 Aug 2006 07:53 GMT
im using vb6 and MSaccess 2003
Public Sub OpenDBConnection()
   Dim strPath As String
  strPath = CurrentProject.Path <<<<<error CurrentProject or
CurrentApplication
  If Right$(strPath, 1) <> "\" Then
     strPath = strPath & "\"
  End If
  strconek = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
  strPath & "\data\MFMS.mdb;Persist Security Info=False"
   Set conn = New ADODB.Connection
   Set rec = New ADODB.Recordset
   'strconek = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\sysnow\data\MFMS.mdb;Persist Security Info=False"
   conn.CursorLocation = adUseClient
   conn.Open strconek
End Sub
is there something wrong with my references
RoyVidar - 30 Aug 2006 08:19 GMT
"macken09@gmail.com" <macken09@gmail.com> wrote in message
<1156920782.811768.34430@e3g2000cwe.googlegroups.com>:
> im using vb6 and MSaccess 2003
> Public Sub OpenDBConnection()
[quoted text clipped - 14 lines]
> End Sub
> is there something wrong with my references

If you're using VB6, then you probably wont find currentproject.path.

Currentproject is a property of the Access application object, and
allows access to the CurrentProject object with related objects,
properties and methods within Access, and, as far as I know, is
available only from Access VBA code (or through automation).

I think you will need other means of retrieving the path, where I
think an NG dedicated to VB6 might be a better place to look. Is
App.Path the equivalent in VB6?

Signature

Roy-Vidar

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.