E ECEK Registered User. Local time Today, 05:57 Joined Dec 19, 2012 Messages 717 Oct 19, 2017 #1 Is it possible to write VBA that will import a file into the database that is in the same folder that the database is in regardless of the address of the folder? Or import the name of the folder itself?
Is it possible to write VBA that will import a file into the database that is in the same folder that the database is in regardless of the address of the folder? Or import the name of the folder itself?
C CJ_London Super Moderator Staff member Local time Today, 05:57 Joined Feb 19, 2013 Messages 17,497 Oct 19, 2017 #2 is the database split? for the front end you can use currentdb.name to give the full path - remove the name to give you the path. if the backend, inspect the tabledefs for a link table to find the path to the backend - think it is currentdb.tabledefs("nameofalinkedtable").connect
is the database split? for the front end you can use currentdb.name to give the full path - remove the name to give you the path. if the backend, inspect the tabledefs for a link table to find the path to the backend - think it is currentdb.tabledefs("nameofalinkedtable").connect
E ECEK Registered User. Local time Today, 05:57 Joined Dec 19, 2012 Messages 717 Oct 19, 2017 #3 Found it !!!! Code: Private Sub Form_Open(Cancel As Integer) Me.Text2 = Application.CurrentProject.Path End Sub
Found it !!!! Code: Private Sub Form_Open(Cancel As Integer) Me.Text2 = Application.CurrentProject.Path End Sub
E ECEK Registered User. Local time Today, 05:57 Joined Dec 19, 2012 Messages 717 Oct 19, 2017 #4 How do I thank myself !!!!
M Mark_ Longboard on the internet Local time Yesterday, 21:57 Joined Sep 12, 2017 Messages 2,399 Oct 19, 2017 #5 ECEK said: How do I thank myself !!!! Click to expand... By renaming Me.Text2 Click to expand... to something you will remember next week when you are wondering why your code that references asCurrentPath doesn't work?
ECEK said: How do I thank myself !!!! Click to expand... By renaming Me.Text2 Click to expand... to something you will remember next week when you are wondering why your code that references asCurrentPath doesn't work?
Uncle Gizmo Nifty Access Guy Staff member Local time Today, 05:57 Joined Jul 9, 2003 Messages 17,448 Oct 19, 2017 #6 ECEK said: How do I thank myself !!!! Click to expand... I've done it for you!