Build a public function that returns the number
Public Sub MyVer (v as string)
v = vProgVersion
end sub
The problem is that you will have to use automation to "open" the
database..and that means the start code will run....
I believe you are looking for the "run" method of the application
myAccessObjectApp.run ("MyVer",vNum)
I think a better approach would to be build a single table + field that
stores he version number. Then use a public function in place of a constant
to grab this value. And, you can then use the dao opendatabase to get a
reocrdet, and NOT have to have the startup code run as per the above
example.
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com http://www.members.shaw.ca/AlbertKallal