-----Original Message-----
Anand,
Here's the good news ....
If you've got as far as wondering 'what to do with' hMod, then you've
already reached your objective.
Specifically, if you check out the local time on the w/stn you are running,
it should now be synch'd with the chosen server (aka any other machine).
For the detail ...
the hMod is a return value from the Shell command - check it out using
Access Help (e.g. place the cursor on the word Shell and press F1).
The command group "Net" is a large collection of things to do with
interrogating and controlling the network. Open up a Command Prompt window
(aka DOS box) and type the command
Net /?
That gets you a list of the many options supported by the Net command. For
more detail, pick any one or the options and again ask for help, as in:
Net Time /?
The detail of the output (and syntax) varies a little from one OS to
another. An XP Pro machine output is shown below, and for comparison the
equivalent from a W98se machine
Good Luck
CD
' ======== sample output from XP Pro DOS box .....
C:\>net /?
The syntax of this command is:
NET [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
HELPMSG | LOCALGROUP | NAME | PAUSE | PRINT | SEND | SESSION |
SHARE | START | STATISTICS | STOP | TIME | USE | USER | VIEW ]
C:\>Net Time /?
The syntax of this command is:
NET TIME
[\\computername | /DOMAIN[:domainname] | /RTSDOMAIN [:domainname]] [/SET]
[\\computername] /QUERYSNTP
[\\computername] /SETSNTP[:ntp server list]
Displays the time on or synchronizes your computer's
clock with the shared clock on a Microsoft Windows for
Workgroups, Windows NT, Windows 95, or NetWare
time server.
' ======== sample output from W98se DOS box .....
C:\>net /?
For more information about a specific Microsoft NET
command, type the command name followed by /?
(for example, NET VIEW /?).
NET CONFIG Displays your current workgroup settings.
NET DIAG Runs the Microsoft Network Diagnostics program to
display diagnostic information about your network.
NET HELP Provides information about commands and
error messages.
NET INIT Loads protocol and network-adapter drivers without
binding them to Protocol Manager.
NET LOGOFF Breaks the connection between your computer and
the shared resources to which it is connected.
NET LOGON Identifies you as a member of a workgroup.
NET PASSWORD Changes your logon password.
NET PRINT Displays information about print queues
and controls print jobs.
NET START Starts services.
NET STOP Stops services.
NET TIME Displays the time on or synchronizes your computer's
clock with the clock on a Microsoft Windows for
Workgroups, Windows NT, Windows 95, or NetWare time server.
NET USE Connects to or disconnects from a shared
resource or displays information about
connections.
NET VER Displays the type and version number of the
workgroup redirector you are using.
NET VIEW Displays a list of computers that share
resources or a list of shared resources
on a specific computer.
C:\>Net Time /?
NET TIME [\\computer | /WORKGROUP:wgname] [/SET] [/YES]
computer Specifies the name of the computer (time
server) whose time you want to check or
synchronize your computer's clock with.
/WORKGROUP Specifies that you want to use the clock on a
computer (time server) in another workgroup.
wgname Specifies the name of the workgroup containing
a computer whose clock you want to check or
synchronize your computer's clock with. If
there are multiple time servers in that
workgroup, NET TIME uses the first one it
finds.
/SET Synchronizes your computer's clock with the
clock on the computer or workgroup you
specify.
/YES Carries out the NET TIME command without
first prompting you to provide information or
confirm actions.
Hi Chadlon
Thanks for the tip. I tried the second method since I
have no experience in programming Windows.
I guess I need a little more help with the sample code you
gave me. I tried to run it in VBA by passing the server
name and when the code executed the hmod variable returned
a number but I cant seem to figure out what to do with
it. Can you tell me where I can find more info about this
Net Time command?
Thanks a bunch
Anand
involve
changing the system question
is 'has this been string
of a linked table.
\\ServerName ... that gives you need
to discover the
.