I have defined a procedure in my module, returning the path of the database and I want to use that path in my sql query.
Procedure in module :
Public Function pathOfBillingSoftware() As String
pathOfBillingSoftware = """path"""
End Function
I am using the function above in my sql query :
SELECT *
FROM tableName IN pathOfBillingSoftware();
It is giving me the error: "error in from clause"
but when I am using it in vba code , it is working fine
a = pathOfBillingSoftware()
sql = "INSERT INTO tableName " & _
"IN " & a & _
" SELECT * FROM tableName"
currentdb.Execute sql
Any Solution ?