I am working in a module in access trying to initialize variables. For some reason the declaration:
Dim ModName As String = "modWindowsFileSystem"
creates a compiling error at the '=' with the error message "Expected:end of statement". I have looked up the format on mutiple websites that all agree with my syntax here is a trustworthy one: http://msdn.microsoft.com/en-us/library/7ee5a7s1.aspx Another website suggested I declare the variable within a function such as
Sub AssignValueString()
Dim Modname As String
Modname = "modWindowsFileSystem"
End Sub
but that seems unnecessary. One issue that may be considered is I have saved the module and named it modWindowsFileSystem. I am not sure if this will conflict somehow with initializing that variable.