app.path i dunno whats wrong HELP newbie here?

M

macken09

AM USING THIS for
now----------------------------------------------------------------------------------------
Public Sub OpenDBConnection()
Set conn = New ADODB.Connection
Set rec = New ADODB.Recordset
strconek = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program
Files\balik sa dati\data\MFMS.mdb;Persist Security Info=False"
conn.CursorLocation = adUseClient
conn.Open strconek
End Sub
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
ICANT USE THIS
Public Sub OpenDBConnection()
Set conn = New ADODB.Connection
Set rec = New ADODB.Recordset
strconek = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
app.path & "\data\MFMS.mdb;Persist Security Info=False"
conn.CursorLocation = adUseClient
conn.Open strconek
End Sub
-----------------------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top