time update command button for record

S

Scuda

Hi all, did a search on this topic and found some great help. My only
question is this: What I would like is JUST the time placed in the text box
when this is clicked, I have the date somewhere else. I tried using using the
input mask but it always gives me the full date and time.

I also tried this:

Private Sub txtCurrentTime_Click()
Me![Time] = Time()
End Sub

Doesn't work. Any and all help greatly appreciated.
Scott
 
K

Klatuu

They only possible reason your code doesn't work is because you have a
control named Time. Even though you reference it using brackets, it may
still be creating an ambiguity Access is having trouble with.

I just tested what you said doesn't work using standard naming conventions,
and it worked just fine.

Always avoid using any Access reserved words for names. Time, Date, Name,
Description, even Oct (it is a function name). To avoid any inadvertant
naming problems, it is a good idea to adopt a naming standard. Here is a
link that may help you get started with that:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp
 
S

Scuda

Thanks Klatuu! Ya know, I have been schooled on naming before so I should
have known. If I want to just have it show Short Time - Military Time, where
can I tell it to do that? I tried the Short Time input mask but didn't work.

Thanks again.


Klatuu said:
They only possible reason your code doesn't work is because you have a
control named Time. Even though you reference it using brackets, it may
still be creating an ambiguity Access is having trouble with.

I just tested what you said doesn't work using standard naming conventions,
and it worked just fine.

Always avoid using any Access reserved words for names. Time, Date, Name,
Description, even Oct (it is a function name). To avoid any inadvertant
naming problems, it is a good idea to adopt a naming standard. Here is a
link that may help you get started with that:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp

Scuda said:
Hi all, did a search on this topic and found some great help. My only
question is this: What I would like is JUST the time placed in the text box
when this is clicked, I have the date somewhere else. I tried using using the
input mask but it always gives me the full date and time.

I also tried this:

Private Sub txtCurrentTime_Click()
Me![Time] = Time()
End Sub

Doesn't work. Any and all help greatly appreciated.
Scott
 
K

Klatuu

Not the input mask, use the Format property. The Input Mask will only apply
to data entered manually into the control. When you populate a control
programmatically, the Input Mask is ignored.

Scuda said:
Thanks Klatuu! Ya know, I have been schooled on naming before so I should
have known. If I want to just have it show Short Time - Military Time, where
can I tell it to do that? I tried the Short Time input mask but didn't work.

Thanks again.


Klatuu said:
They only possible reason your code doesn't work is because you have a
control named Time. Even though you reference it using brackets, it may
still be creating an ambiguity Access is having trouble with.

I just tested what you said doesn't work using standard naming conventions,
and it worked just fine.

Always avoid using any Access reserved words for names. Time, Date, Name,
Description, even Oct (it is a function name). To avoid any inadvertant
naming problems, it is a good idea to adopt a naming standard. Here is a
link that may help you get started with that:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp

Scuda said:
Hi all, did a search on this topic and found some great help. My only
question is this: What I would like is JUST the time placed in the text box
when this is clicked, I have the date somewhere else. I tried using using the
input mask but it always gives me the full date and time.

I also tried this:

Private Sub txtCurrentTime_Click()
Me![Time] = Time()
End Sub

Doesn't work. Any and all help greatly appreciated.
Scott
 
S

Scuda

Hmm, that is actually what I had Short Time in, the format box, I mispoke.

I am still getting the full time, like 11:33:09 AM

Thanks for all the help

Klatuu said:
Not the input mask, use the Format property. The Input Mask will only apply
to data entered manually into the control. When you populate a control
programmatically, the Input Mask is ignored.

Scuda said:
Thanks Klatuu! Ya know, I have been schooled on naming before so I should
have known. If I want to just have it show Short Time - Military Time, where
can I tell it to do that? I tried the Short Time input mask but didn't work.

Thanks again.


Klatuu said:
They only possible reason your code doesn't work is because you have a
control named Time. Even though you reference it using brackets, it may
still be creating an ambiguity Access is having trouble with.

I just tested what you said doesn't work using standard naming conventions,
and it worked just fine.

Always avoid using any Access reserved words for names. Time, Date, Name,
Description, even Oct (it is a function name). To avoid any inadvertant
naming problems, it is a good idea to adopt a naming standard. Here is a
link that may help you get started with that:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp

:

Hi all, did a search on this topic and found some great help. My only
question is this: What I would like is JUST the time placed in the text box
when this is clicked, I have the date somewhere else. I tried using using the
input mask but it always gives me the full date and time.

I also tried this:

Private Sub txtCurrentTime_Click()
Me![Time] = Time()
End Sub

Doesn't work. Any and all help greatly appreciated.
Scott
 
K

Klatuu

Interesting, it worked for me, but I got 10:14
Is your watch correct :)

Scuda said:
Hmm, that is actually what I had Short Time in, the format box, I mispoke.

I am still getting the full time, like 11:33:09 AM

Thanks for all the help

Klatuu said:
Not the input mask, use the Format property. The Input Mask will only apply
to data entered manually into the control. When you populate a control
programmatically, the Input Mask is ignored.

Scuda said:
Thanks Klatuu! Ya know, I have been schooled on naming before so I should
have known. If I want to just have it show Short Time - Military Time, where
can I tell it to do that? I tried the Short Time input mask but didn't work.

Thanks again.


:

They only possible reason your code doesn't work is because you have a
control named Time. Even though you reference it using brackets, it may
still be creating an ambiguity Access is having trouble with.

I just tested what you said doesn't work using standard naming conventions,
and it worked just fine.

Always avoid using any Access reserved words for names. Time, Date, Name,
Description, even Oct (it is a function name). To avoid any inadvertant
naming problems, it is a good idea to adopt a naming standard. Here is a
link that may help you get started with that:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp

:

Hi all, did a search on this topic and found some great help. My only
question is this: What I would like is JUST the time placed in the text box
when this is clicked, I have the date somewhere else. I tried using using the
input mask but it always gives me the full date and time.

I also tried this:

Private Sub txtCurrentTime_Click()
Me![Time] = Time()
End Sub

Doesn't work. Any and all help greatly appreciated.
Scott
 
S

Scuda

Well, I am stumped. I will keep digging, prob something stupid. Thanks
again for all the help.

And no, time is correct, they call it the RIGHT coast for a reason! :)


Klatuu said:
Interesting, it worked for me, but I got 10:14
Is your watch correct :)

Scuda said:
Hmm, that is actually what I had Short Time in, the format box, I mispoke.

I am still getting the full time, like 11:33:09 AM

Thanks for all the help

Klatuu said:
Not the input mask, use the Format property. The Input Mask will only apply
to data entered manually into the control. When you populate a control
programmatically, the Input Mask is ignored.

:

Thanks Klatuu! Ya know, I have been schooled on naming before so I should
have known. If I want to just have it show Short Time - Military Time, where
can I tell it to do that? I tried the Short Time input mask but didn't work.

Thanks again.


:

They only possible reason your code doesn't work is because you have a
control named Time. Even though you reference it using brackets, it may
still be creating an ambiguity Access is having trouble with.

I just tested what you said doesn't work using standard naming conventions,
and it worked just fine.

Always avoid using any Access reserved words for names. Time, Date, Name,
Description, even Oct (it is a function name). To avoid any inadvertant
naming problems, it is a good idea to adopt a naming standard. Here is a
link that may help you get started with that:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp

:

Hi all, did a search on this topic and found some great help. My only
question is this: What I would like is JUST the time placed in the text box
when this is clicked, I have the date somewhere else. I tried using using the
input mask but it always gives me the full date and time.

I also tried this:

Private Sub txtCurrentTime_Click()
Me![Time] = Time()
End Sub

Doesn't work. Any and all help greatly appreciated.
Scott
 
K

Klatuu

Actually, I find that most of the Right coast is way to far to the left :)

Scuda said:
Well, I am stumped. I will keep digging, prob something stupid. Thanks
again for all the help.

And no, time is correct, they call it the RIGHT coast for a reason! :)


Klatuu said:
Interesting, it worked for me, but I got 10:14
Is your watch correct :)

Scuda said:
Hmm, that is actually what I had Short Time in, the format box, I mispoke.

I am still getting the full time, like 11:33:09 AM

Thanks for all the help

:

Not the input mask, use the Format property. The Input Mask will only apply
to data entered manually into the control. When you populate a control
programmatically, the Input Mask is ignored.

:

Thanks Klatuu! Ya know, I have been schooled on naming before so I should
have known. If I want to just have it show Short Time - Military Time, where
can I tell it to do that? I tried the Short Time input mask but didn't work.

Thanks again.


:

They only possible reason your code doesn't work is because you have a
control named Time. Even though you reference it using brackets, it may
still be creating an ambiguity Access is having trouble with.

I just tested what you said doesn't work using standard naming conventions,
and it worked just fine.

Always avoid using any Access reserved words for names. Time, Date, Name,
Description, even Oct (it is a function name). To avoid any inadvertant
naming problems, it is a good idea to adopt a naming standard. Here is a
link that may help you get started with that:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp

:

Hi all, did a search on this topic and found some great help. My only
question is this: What I would like is JUST the time placed in the text box
when this is clicked, I have the date somewhere else. I tried using using the
input mask but it always gives me the full date and time.

I also tried this:

Private Sub txtCurrentTime_Click()
Me![Time] = Time()
End Sub

Doesn't work. Any and all help greatly appreciated.
Scott
 
S

Scuda

Oh, you have NO idea how right (correct) you are, or maybe you do. I am not
sure how long I can live in the Northeast.

Klatuu said:
Actually, I find that most of the Right coast is way to far to the left :)

Scuda said:
Well, I am stumped. I will keep digging, prob something stupid. Thanks
again for all the help.

And no, time is correct, they call it the RIGHT coast for a reason! :)


Klatuu said:
Interesting, it worked for me, but I got 10:14
Is your watch correct :)

:

Hmm, that is actually what I had Short Time in, the format box, I mispoke.

I am still getting the full time, like 11:33:09 AM

Thanks for all the help

:

Not the input mask, use the Format property. The Input Mask will only apply
to data entered manually into the control. When you populate a control
programmatically, the Input Mask is ignored.

:

Thanks Klatuu! Ya know, I have been schooled on naming before so I should
have known. If I want to just have it show Short Time - Military Time, where
can I tell it to do that? I tried the Short Time input mask but didn't work.

Thanks again.


:

They only possible reason your code doesn't work is because you have a
control named Time. Even though you reference it using brackets, it may
still be creating an ambiguity Access is having trouble with.

I just tested what you said doesn't work using standard naming conventions,
and it worked just fine.

Always avoid using any Access reserved words for names. Time, Date, Name,
Description, even Oct (it is a function name). To avoid any inadvertant
naming problems, it is a good idea to adopt a naming standard. Here is a
link that may help you get started with that:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp

:

Hi all, did a search on this topic and found some great help. My only
question is this: What I would like is JUST the time placed in the text box
when this is clicked, I have the date somewhere else. I tried using using the
input mask but it always gives me the full date and time.

I also tried this:

Private Sub txtCurrentTime_Click()
Me![Time] = Time()
End Sub

Doesn't work. Any and all help greatly appreciated.
Scott
 
K

Klatuu

Welcome to the People's Republic of New England
(A wholly owned subsidiary of San Francisco)

Please leave the following items at the door:
Guns - They are not allowed
Morales - They are irrelevant

Please turn over all your money to the government. We know, much better
than you, how it should be managed.

Scuda said:
Oh, you have NO idea how right (correct) you are, or maybe you do. I am not
sure how long I can live in the Northeast.

Klatuu said:
Actually, I find that most of the Right coast is way to far to the left :)

Scuda said:
Well, I am stumped. I will keep digging, prob something stupid. Thanks
again for all the help.

And no, time is correct, they call it the RIGHT coast for a reason! :)


:

Interesting, it worked for me, but I got 10:14
Is your watch correct :)

:

Hmm, that is actually what I had Short Time in, the format box, I mispoke.

I am still getting the full time, like 11:33:09 AM

Thanks for all the help

:

Not the input mask, use the Format property. The Input Mask will only apply
to data entered manually into the control. When you populate a control
programmatically, the Input Mask is ignored.

:

Thanks Klatuu! Ya know, I have been schooled on naming before so I should
have known. If I want to just have it show Short Time - Military Time, where
can I tell it to do that? I tried the Short Time input mask but didn't work.

Thanks again.


:

They only possible reason your code doesn't work is because you have a
control named Time. Even though you reference it using brackets, it may
still be creating an ambiguity Access is having trouble with.

I just tested what you said doesn't work using standard naming conventions,
and it worked just fine.

Always avoid using any Access reserved words for names. Time, Date, Name,
Description, even Oct (it is a function name). To avoid any inadvertant
naming problems, it is a good idea to adopt a naming standard. Here is a
link that may help you get started with that:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp

:

Hi all, did a search on this topic and found some great help. My only
question is this: What I would like is JUST the time placed in the text box
when this is clicked, I have the date somewhere else. I tried using using the
input mask but it always gives me the full date and time.

I also tried this:

Private Sub txtCurrentTime_Click()
Me![Time] = Time()
End Sub

Doesn't work. Any and all help greatly appreciated.
Scott
 
S

Scuda

Klatuu said:
Welcome to the People's Republic of New England
(A wholly owned subsidiary of San Francisco)

Please leave the following items at the door:
Guns - They are not allowed
Morales - They are irrelevant

Please turn over all your money to the government. We know, much better
than you, how it should be managed.

Scuda said:
Oh, you have NO idea how right (correct) you are, or maybe you do. I am not
sure how long I can live in the Northeast.

Klatuu said:
Actually, I find that most of the Right coast is way to far to the left :)

:

Well, I am stumped. I will keep digging, prob something stupid. Thanks
again for all the help.

And no, time is correct, they call it the RIGHT coast for a reason! :)


:

Interesting, it worked for me, but I got 10:14
Is your watch correct :)

:

Hmm, that is actually what I had Short Time in, the format box, I mispoke.

I am still getting the full time, like 11:33:09 AM

Thanks for all the help

:

Not the input mask, use the Format property. The Input Mask will only apply
to data entered manually into the control. When you populate a control
programmatically, the Input Mask is ignored.

:

Thanks Klatuu! Ya know, I have been schooled on naming before so I should
have known. If I want to just have it show Short Time - Military Time, where
can I tell it to do that? I tried the Short Time input mask but didn't work.

Thanks again.


:

They only possible reason your code doesn't work is because you have a
control named Time. Even though you reference it using brackets, it may
still be creating an ambiguity Access is having trouble with.

I just tested what you said doesn't work using standard naming conventions,
and it worked just fine.

Always avoid using any Access reserved words for names. Time, Date, Name,
Description, even Oct (it is a function name). To avoid any inadvertant
naming problems, it is a good idea to adopt a naming standard. Here is a
link that may help you get started with that:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnaraccess/html/msdn_20naming.asp

:

Hi all, did a search on this topic and found some great help. My only
question is this: What I would like is JUST the time placed in the text box
when this is clicked, I have the date somewhere else. I tried using using the
input mask but it always gives me the full date and time.

I also tried this:

Private Sub txtCurrentTime_Click()
Me![Time] = Time()
End Sub

Doesn't work. Any and all help greatly appreciated.
Scott
 
Top