Formula to capture filename in a query.

Ajit Singh

Registered User.
Local time
Today, 13:22
Joined
Jul 11, 2013
Messages
34
Need a formula which can capture filename for me. For example, I have a db saved at "C:\D\location\office\China.accdb". Is there a way to capture "China" in a query?
 
You can use CurrentProject.Name, to get the file name, then use Left function to get the find the file name.
Code:
? Left(CurrentProject.Name, Instr(CurrentProject.Name, ".")-1)
 
Awesome ..................thank you so much !!!!!!!!!!!!!!
 

Users who are viewing this thread

Back
Top Bottom