Hi,
Our Client Support team has been posed this question from one of our developers.
He has a macro in an Access application that has a message box. Part of the message displayed is the path to a certain file. He references this path 'string variable' by embedding the following SavePath function (below)in the sting which formats the message.
Public Function SavePath() As String
SavePath = CopyPath
End Function
He declares the variable as follows:
Public Const CopyPath As String = "F:\RAS\IAS\SAGE\Daily\Backup"
His 2 questions are:
How can he eliminate the creation of the SavePath() function to embed the CopyPath value in the message box macro?
There must be a better way than to keep on creating more functions just to reference the value of variables set in code.
Is there syntax we can use to directly reference the value for a code defined variable from a macro?
Any help with this is appreciated.
Thanks
Our Client Support team has been posed this question from one of our developers.
He has a macro in an Access application that has a message box. Part of the message displayed is the path to a certain file. He references this path 'string variable' by embedding the following SavePath function (below)in the sting which formats the message.
Public Function SavePath() As String
SavePath = CopyPath
End Function
He declares the variable as follows:
Public Const CopyPath As String = "F:\RAS\IAS\SAGE\Daily\Backup"
His 2 questions are:
How can he eliminate the creation of the SavePath() function to embed the CopyPath value in the message box macro?
There must be a better way than to keep on creating more functions just to reference the value of variables set in code.
Is there syntax we can use to directly reference the value for a code defined variable from a macro?
Any help with this is appreciated.
Thanks