From: John W. Vinson on
On Thu, 05 Nov 2009 03:01:57 GMT, "AccessVandal via AccessMonster.com"
<u18947(a)uwe> wrote:

>Did you correct the code as suggested by Stefan?
>
>With this
>"Dim dwMachineNum, dwEMachineNum, dwYear, dwMonth, dwDay, dwHour,
>dwMinute, dwSecond, dwWorkcode, dwReserved As Long"

Do note that this dimensions dwReserved as a Long - but dims all of the other
variables as Variants, the default.

You must use

Dim dwMachineNum As Long, dwEMachineNum As Long, dwYear As Long, dwMonth As
Long, dwDay As Long, dwHour As Long, dwMinute As Long, dwSecond As Long,
dwWorkcode As Long, dwReserved As Long

to specify each of the variables as Long.

>It's better to include the "Option Explicit" to check for any undeclared
>objects in your code just in case there may be typos as well.

Absolutely and always.
--

John W. Vinson [MVP]
From: yanto on
On Nov 5, 10:44 am, John W. Vinson
<jvinson(a)STOP_SPAM.WysardOfInfo.com> wrote:
> On Thu, 05 Nov 2009 03:01:57 GMT, "AccessVandal via AccessMonster.com"
>
> <u18947(a)uwe> wrote:
> >Did you correct the code as suggested by Stefan?
>
> >With this
> >"Dim dwMachineNum, dwEMachineNum, dwYear, dwMonth, dwDay, dwHour,
> >dwMinute, dwSecond, dwWorkcode, dwReserved As Long"
>
> Do note that this dimensions dwReserved as a Long - but dims all of the other
> variables as Variants, the default.
>
> You must use
Thanks for all response, I will try soon.

>
> Dim dwMachineNum As Long, dwEMachineNum As Long, dwYear As Long, dwMonth As
> Long, dwDay As Long, dwHour As Long, dwMinute As Long, dwSecond As Long,
> dwWorkcode As Long, dwReserved As Long
>
> to specify each of the variables as Long.
>
> >It's better to include the "Option Explicit" to check for any undeclared
> >objects in your code just in case there may be typos as well.
>
> Absolutely and always.
> --
>
>              John W. Vinson [MVP]

From: yanto on
I forget something, the error come out when I close the form and also
quit access, because I only have one form

On Nov 5, 10:44 am, John W. Vinson
<jvinson(a)STOP_SPAM.WysardOfInfo.com> wrote:
> On Thu, 05 Nov 2009 03:01:57 GMT, "AccessVandal via AccessMonster.com"
>
> <u18947(a)uwe> wrote:
> >Did you correct the code as suggested by Stefan?
>
> >With this
> >"Dim dwMachineNum, dwEMachineNum, dwYear, dwMonth, dwDay, dwHour,
> >dwMinute, dwSecond, dwWorkcode, dwReserved As Long"
>
> Do note that this dimensions dwReserved as a Long - but dims all of the other
> variables as Variants, the default.
>
> You must use
>
> Dim dwMachineNum As Long, dwEMachineNum As Long, dwYear As Long, dwMonth As
> Long, dwDay As Long, dwHour As Long, dwMinute As Long, dwSecond As Long,
> dwWorkcode As Long, dwReserved As Long
>
> to specify each of the variables as Long.
>
> >It's better to include the "Option Explicit" to check for any undeclared
> >objects in your code just in case there may be typos as well.
>
> Absolutely and always.
> --
>
>              John W. Vinson [MVP]