I'm not aware of a method or property to return the current workgroup file. However, you can extract it from CurrentProject.Connection when you have a database open in Access.
Public Function CurrentWorkgroupFile() As String
Dim strSplit1 As String
strSplit1 = Split(CurrentProject.Connection, "System database=")(1)
CurrentWorkgroupFile = Split(strSplit1, ";")(0)
End Function
Edit: I think the Split() function is available in Access versions starting with 2000. If your Access version is older, you will need to extract the workgroup file location by another method.
Edit2: Read about DBEngine.SystemDB in the comments following this answer.