I need to be flexible when I open the mdb at customer sites. The line that is commented out works fine but the one I am trying under it errors:
I am following a textbook; however, I get an error saying:Code:Option Explicit 'Private Const CNXSTRING As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Aces Projects\GL\database\AcesGL.mdb;Persist Security Info=False" Private Const CNXSTRING = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & App.Path & "\database\AcesGL.mdb;Persist Security Info=False" Private cnx As ADODB.Connection Private rs As ADODB.Recordset Private aRs As ADODB.Recordset Private Prs As ADODB.Recordset
"Constant Expression Required"
App.Path is correct and has a value of "C:\Aces Projects\GL"
Thanks in advance for help.




Reply With Quote