Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Petition OS for version information

Status
Not open for further replies.

biot023

Programmer
Nov 8, 2001
403
GB
Does anybody know how to ask, in Access VBA, which operating system is being used?
I need to do this, as a system I wrote for windows '97 is now needed to run on Windows 2000 machines as well. The trouble is, it calls different versions of a viewer, depending on the OS, that are kept in different directories.

Any help is deeply appreciated.

Douglas JL If it don't make you laugh, it ain't true.
 
You'd think that this was embarassingly simple, but I don't happen to know it either.

Until someone gives the answer, here's a fallback possibility for you - an ActiveX control (I haven't used it):
 
Debug.Print &quot;<&quot; & Environ(&quot;OS&quot;) & &quot;>&quot;
comes back as &quot;<>&quot; here - A2K on Win98
 
Yeah, you'll have that, it's an NT variable, so I think (Haven't tried) it would work on 2000 but it definitely won't work on 9x. I was sending it to Douglas in hopes that it would work on 2000 so if nothing else he could run a If IsNull(Environ(&quot;OS&quot;)) Then function or something...

I'll find the answer for 9x and post it ASAP. Kyle ::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top