Hi there,
I have a strange problem with CurrentProject.Path - I use it to get the path of a another configuration file that is located in the same folder where my accde is located. When somebody else opens the accde on another machine, CurrentProject.Path does not give the new current directory path but the old path of my machine. So somehow the information is stored and not refreshed when executed on another machine. Does somebody know this behaviour and could propose a solution?
Thanks for help! Frank
This is the code:
	
	
	
		
 I have a strange problem with CurrentProject.Path - I use it to get the path of a another configuration file that is located in the same folder where my accde is located. When somebody else opens the accde on another machine, CurrentProject.Path does not give the new current directory path but the old path of my machine. So somehow the information is stored and not refreshed when executed on another machine. Does somebody know this behaviour and could propose a solution?
Thanks for help! Frank
This is the code:
		Code:
	
	
	Public Function StartFunction()
Dim strSQL, Database_filepath As String
Dim var As Double
Dim sales_month As Double
Dim sTemp As String
Dim sValue As String
Dim tdf As TableDef
Dim Conn  As ADODB.Connection
 Dim db As Database, i As Integer
 Dim myTable As TableDef
 Dim RSTSchema As New ADODB.Recordset
 Dim cat As New ADOX.Catalog
 Dim Constr As String
  Set Conn = New ADODB.Connection
  Set db = CurrentDb
DoCmd.SetWarnings False
'myFolder = Left(CurrentDb.name, InStrRev(CurrentDb.name, "\"))
Database_filepath = CurrentProject.Path & "\" & "configuration_tm.accdb"
do_link_tables = link_tables_configuration(Database_filepath)
... 
	 
 
		 
 
		 The path it's returning for for any of these should be the same, and is exactly where the .accdb file is sitting:
  The path it's returning for for any of these should be the same, and is exactly where the .accdb file is sitting: Or, maybe the user decided to be helpful and reorganize?
  Or, maybe the user decided to be helpful and reorganize? 
 
		
 
 
		 
 
		 
 
		 
 
		 
 
		