A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Refreshing Question



 
 
Thread Tools Display Modes
  #1  
Old September 2nd, 2009, 03:38 PM posted to microsoft.public.access
Bunky
external usenet poster
 
Posts: 374
Default Refreshing Question

I have a mainform with two subforms, all driven by different tables. On the
one subform, when the operation clicks an option (there are 17 of them), I
have code running behind it to populate different fields one of which is the
Comment Date and Time field. The problem is if the operator is in the middle
of entering an option and then goes on break. When, they come back, the time
is 15 minutes off the actual time the operator did the work. Here is the
code.
Private Sub Frame10_Click()
Me.Splst.Value = fOSUserName()
Me.Parent!Specialist.Value = fOSUserName()
Me.Parent![Date Worked].Value = Me.DateofComment.Value
Me.OptionChosen = Me.Frame10.Value
Me.Parent!Results.Value = Me.Frame10.Value
End Sub

I thought if they just re-clicked another option and then clicked the first
option chosen, it would update the time but it does not. How can I force a
new time each time an option is clicked?

Ideas are always welcome!
  #2  
Old September 2nd, 2009, 04:19 PM posted to microsoft.public.access
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Refreshing Question

Bunky,

Try using the After Update event of the Frame, though I am still unclear why
you want to do it this way because that 15 minutes could be just the
Operator confirming something prior to reselecting.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
I have a mainform with two subforms, all driven by different tables. On
the
one subform, when the operation clicks an option (there are 17 of them), I
have code running behind it to populate different fields one of which is
the
Comment Date and Time field. The problem is if the operator is in the
middle
of entering an option and then goes on break. When, they come back, the
time
is 15 minutes off the actual time the operator did the work. Here is the
code.
Private Sub Frame10_Click()
Me.Splst.Value = fOSUserName()
Me.Parent!Specialist.Value = fOSUserName()
Me.Parent![Date Worked].Value = Me.DateofComment.Value
Me.OptionChosen = Me.Frame10.Value
Me.Parent!Results.Value = Me.Frame10.Value
End Sub

I thought if they just re-clicked another option and then clicked the
first
option chosen, it would update the time but it does not. How can I force a
new time each time an option is clicked?

Ideas are always welcome!



  #3  
Old September 2nd, 2009, 04:36 PM posted to microsoft.public.access
Bunky
external usenet poster
 
Posts: 374
Default Refreshing Question

Gina,

I put all the coding in the After Update but it did the same thing which is
not changing the date / Time when different selections are clicked. The
reason is not really for the breaks but for lunchs. Our operators are on the
phone to our owners and we tell them the exact date and time we did something
for them. Believe me the owners will correct you if you are an hour off.

"Gina Whipp" wrote:

Bunky,

Try using the After Update event of the Frame, though I am still unclear why
you want to do it this way because that 15 minutes could be just the
Operator confirming something prior to reselecting.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
I have a mainform with two subforms, all driven by different tables. On
the
one subform, when the operation clicks an option (there are 17 of them), I
have code running behind it to populate different fields one of which is
the
Comment Date and Time field. The problem is if the operator is in the
middle
of entering an option and then goes on break. When, they come back, the
time
is 15 minutes off the actual time the operator did the work. Here is the
code.
Private Sub Frame10_Click()
Me.Splst.Value = fOSUserName()
Me.Parent!Specialist.Value = fOSUserName()
Me.Parent![Date Worked].Value = Me.DateofComment.Value
Me.OptionChosen = Me.Frame10.Value
Me.Parent!Results.Value = Me.Frame10.Value
End Sub

I thought if they just re-clicked another option and then clicked the
first
option chosen, it would update the time but it does not. How can I force a
new time each time an option is clicked?

Ideas are always welcome!




  #4  
Old September 2nd, 2009, 04:44 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Refreshing Question

On Wed, 2 Sep 2009 07:38:01 -0700, Bunky
wrote:

I have a mainform with two subforms, all driven by different tables. On the
one subform, when the operation clicks an option (there are 17 of them), I
have code running behind it to populate different fields one of which is the
Comment Date and Time field. The problem is if the operator is in the middle
of entering an option and then goes on break. When, they come back, the time
is 15 minutes off the actual time the operator did the work. Here is the
code.
Private Sub Frame10_Click()
Me.Splst.Value = fOSUserName()
Me.Parent!Specialist.Value = fOSUserName()
Me.Parent![Date Worked].Value = Me.DateofComment.Value
Me.OptionChosen = Me.Frame10.Value
Me.Parent!Results.Value = Me.Frame10.Value
End Sub

I thought if they just re-clicked another option and then clicked the first
option chosen, it would update the time but it does not. How can I force a
new time each time an option is clicked?

Ideas are always welcome!


Put a line

Me.Dirty = False

immediately before the End Sub to force an immediate save.

Note that this will cause problems if you have any Required fields which have
not yet been filled in.
--

John W. Vinson [MVP]
  #5  
Old September 2nd, 2009, 04:56 PM posted to microsoft.public.access
Bunky
external usenet poster
 
Posts: 374
Default Refreshing Question

Hi John,

I tried the code you suggested on both the 'ON Click' Event and the 'After
Update' event and neither did what I want to happen.

Ideas?

"John W. Vinson" wrote:

On Wed, 2 Sep 2009 07:38:01 -0700, Bunky
wrote:

I have a mainform with two subforms, all driven by different tables. On the
one subform, when the operation clicks an option (there are 17 of them), I
have code running behind it to populate different fields one of which is the
Comment Date and Time field. The problem is if the operator is in the middle
of entering an option and then goes on break. When, they come back, the time
is 15 minutes off the actual time the operator did the work. Here is the
code.
Private Sub Frame10_Click()
Me.Splst.Value = fOSUserName()
Me.Parent!Specialist.Value = fOSUserName()
Me.Parent![Date Worked].Value = Me.DateofComment.Value
Me.OptionChosen = Me.Frame10.Value
Me.Parent!Results.Value = Me.Frame10.Value
End Sub

I thought if they just re-clicked another option and then clicked the first
option chosen, it would update the time but it does not. How can I force a
new time each time an option is clicked?

Ideas are always welcome!


Put a line

Me.Dirty = False

immediately before the End Sub to force an immediate save.

Note that this will cause problems if you have any Required fields which have
not yet been filled in.
--

John W. Vinson [MVP]

  #6  
Old September 2nd, 2009, 05:01 PM posted to microsoft.public.access
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Refreshing Question

Bunky,

I did not mean to move the entire code, my fault for not saying so.... just
this line...

Me.Parent![Date Worked].Value = Me.DateofComment.Value

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
Gina,

I put all the coding in the After Update but it did the same thing which
is
not changing the date / Time when different selections are clicked. The
reason is not really for the breaks but for lunchs. Our operators are on
the
phone to our owners and we tell them the exact date and time we did
something
for them. Believe me the owners will correct you if you are an hour off.

"Gina Whipp" wrote:

Bunky,

Try using the After Update event of the Frame, though I am still unclear
why
you want to do it this way because that 15 minutes could be just the
Operator confirming something prior to reselecting.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
I have a mainform with two subforms, all driven by different tables. On
the
one subform, when the operation clicks an option (there are 17 of
them), I
have code running behind it to populate different fields one of which
is
the
Comment Date and Time field. The problem is if the operator is in the
middle
of entering an option and then goes on break. When, they come back,
the
time
is 15 minutes off the actual time the operator did the work. Here is
the
code.
Private Sub Frame10_Click()
Me.Splst.Value = fOSUserName()
Me.Parent!Specialist.Value = fOSUserName()
Me.Parent![Date Worked].Value = Me.DateofComment.Value
Me.OptionChosen = Me.Frame10.Value
Me.Parent!Results.Value = Me.Frame10.Value
End Sub

I thought if they just re-clicked another option and then clicked the
first
option chosen, it would update the time but it does not. How can I
force a
new time each time an option is clicked?

Ideas are always welcome!






  #7  
Old September 2nd, 2009, 05:10 PM posted to microsoft.public.access
Bunky
external usenet poster
 
Posts: 374
Default Refreshing Question

No Problem, but it still does not work the way I want it to.

Ideas?

"Gina Whipp" wrote:

Bunky,

I did not mean to move the entire code, my fault for not saying so.... just
this line...

Me.Parent![Date Worked].Value = Me.DateofComment.Value

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
Gina,

I put all the coding in the After Update but it did the same thing which
is
not changing the date / Time when different selections are clicked. The
reason is not really for the breaks but for lunchs. Our operators are on
the
phone to our owners and we tell them the exact date and time we did
something
for them. Believe me the owners will correct you if you are an hour off.

"Gina Whipp" wrote:

Bunky,

Try using the After Update event of the Frame, though I am still unclear
why
you want to do it this way because that 15 minutes could be just the
Operator confirming something prior to reselecting.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
I have a mainform with two subforms, all driven by different tables. On
the
one subform, when the operation clicks an option (there are 17 of
them), I
have code running behind it to populate different fields one of which
is
the
Comment Date and Time field. The problem is if the operator is in the
middle
of entering an option and then goes on break. When, they come back,
the
time
is 15 minutes off the actual time the operator did the work. Here is
the
code.
Private Sub Frame10_Click()
Me.Splst.Value = fOSUserName()
Me.Parent!Specialist.Value = fOSUserName()
Me.Parent![Date Worked].Value = Me.DateofComment.Value
Me.OptionChosen = Me.Frame10.Value
Me.Parent!Results.Value = Me.Frame10.Value
End Sub

I thought if they just re-clicked another option and then clicked the
first
option chosen, it would update the time but it does not. How can I
force a
new time each time an option is clicked?

Ideas are always welcome!






  #8  
Old September 2nd, 2009, 05:14 PM posted to microsoft.public.access
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Refreshing Question

Bunky,

Perhaps the way you want it to work will require putting that on the
On_Dirty of the form? That way any time anything on that form is changed
the date will update?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
No Problem, but it still does not work the way I want it to.

Ideas?

"Gina Whipp" wrote:

Bunky,

I did not mean to move the entire code, my fault for not saying so....
just
this line...

Me.Parent![Date Worked].Value = Me.DateofComment.Value

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
Gina,

I put all the coding in the After Update but it did the same thing
which
is
not changing the date / Time when different selections are clicked.
The
reason is not really for the breaks but for lunchs. Our operators are
on
the
phone to our owners and we tell them the exact date and time we did
something
for them. Believe me the owners will correct you if you are an hour
off.

"Gina Whipp" wrote:

Bunky,

Try using the After Update event of the Frame, though I am still
unclear
why
you want to do it this way because that 15 minutes could be just the
Operator confirming something prior to reselecting.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
I have a mainform with two subforms, all driven by different tables.
On
the
one subform, when the operation clicks an option (there are 17 of
them), I
have code running behind it to populate different fields one of
which
is
the
Comment Date and Time field. The problem is if the operator is in
the
middle
of entering an option and then goes on break. When, they come back,
the
time
is 15 minutes off the actual time the operator did the work. Here
is
the
code.
Private Sub Frame10_Click()
Me.Splst.Value = fOSUserName()
Me.Parent!Specialist.Value = fOSUserName()
Me.Parent![Date Worked].Value = Me.DateofComment.Value
Me.OptionChosen = Me.Frame10.Value
Me.Parent!Results.Value = Me.Frame10.Value
End Sub

I thought if they just re-clicked another option and then clicked
the
first
option chosen, it would update the time but it does not. How can I
force a
new time each time an option is clicked?

Ideas are always welcome!








  #9  
Old September 2nd, 2009, 05:28 PM posted to microsoft.public.access
Bunky
external usenet poster
 
Posts: 374
Default Refreshing Question

Gina,

Still no luck but I noticed something. On my subform, I placed an 'Undo'
button to undo changes if they catch the error prior to the update. If I
click on the undo button, the date/time refreshes. The code on the undo is
simply this:
Private Sub Undo_Record_Click()
On Error GoTo Err_Undo_Record_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
Me.Parent!Results.Value = Null

Exit_Undo_Record_Click:
Exit Sub

Err_Undo_Record_Click:
MsgBox Err.Description
Resume Exit_Undo_Record_Click

End Sub

Ideas?

"Gina Whipp" wrote:

Bunky,

Perhaps the way you want it to work will require putting that on the
On_Dirty of the form? That way any time anything on that form is changed
the date will update?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
No Problem, but it still does not work the way I want it to.

Ideas?

"Gina Whipp" wrote:

Bunky,

I did not mean to move the entire code, my fault for not saying so....
just
this line...

Me.Parent![Date Worked].Value = Me.DateofComment.Value

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
Gina,

I put all the coding in the After Update but it did the same thing
which
is
not changing the date / Time when different selections are clicked.
The
reason is not really for the breaks but for lunchs. Our operators are
on
the
phone to our owners and we tell them the exact date and time we did
something
for them. Believe me the owners will correct you if you are an hour
off.

"Gina Whipp" wrote:

Bunky,

Try using the After Update event of the Frame, though I am still
unclear
why
you want to do it this way because that 15 minutes could be just the
Operator confirming something prior to reselecting.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
I have a mainform with two subforms, all driven by different tables.
On
the
one subform, when the operation clicks an option (there are 17 of
them), I
have code running behind it to populate different fields one of
which
is
the
Comment Date and Time field. The problem is if the operator is in
the
middle
of entering an option and then goes on break. When, they come back,
the
time
is 15 minutes off the actual time the operator did the work. Here
is
the
code.
Private Sub Frame10_Click()
Me.Splst.Value = fOSUserName()
Me.Parent!Specialist.Value = fOSUserName()
Me.Parent![Date Worked].Value = Me.DateofComment.Value
Me.OptionChosen = Me.Frame10.Value
Me.Parent!Results.Value = Me.Frame10.Value
End Sub

I thought if they just re-clicked another option and then clicked
the
first
option chosen, it would update the time but it does not. How can I
force a
new time each time an option is clicked?

Ideas are always welcome!









  #10  
Old September 2nd, 2009, 05:40 PM posted to microsoft.public.access
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Refreshing Question

Bunky,

Is this code you entered on the form or the subform? Because it should be
in the Form_Dristy event of the subform. If it is then please copy/paste
the code behind the subform.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
Gina,

Still no luck but I noticed something. On my subform, I placed an 'Undo'
button to undo changes if they catch the error prior to the update. If I
click on the undo button, the date/time refreshes. The code on the undo
is
simply this:
Private Sub Undo_Record_Click()
On Error GoTo Err_Undo_Record_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
Me.Parent!Results.Value = Null

Exit_Undo_Record_Click:
Exit Sub

Err_Undo_Record_Click:
MsgBox Err.Description
Resume Exit_Undo_Record_Click

End Sub

Ideas?

"Gina Whipp" wrote:

Bunky,

Perhaps the way you want it to work will require putting that on the
On_Dirty of the form? That way any time anything on that form is changed
the date will update?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
No Problem, but it still does not work the way I want it to.

Ideas?

"Gina Whipp" wrote:

Bunky,

I did not mean to move the entire code, my fault for not saying so....
just
this line...

Me.Parent![Date Worked].Value = Me.DateofComment.Value

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
Gina,

I put all the coding in the After Update but it did the same thing
which
is
not changing the date / Time when different selections are clicked.
The
reason is not really for the breaks but for lunchs. Our operators
are
on
the
phone to our owners and we tell them the exact date and time we did
something
for them. Believe me the owners will correct you if you are an hour
off.

"Gina Whipp" wrote:

Bunky,

Try using the After Update event of the Frame, though I am still
unclear
why
you want to do it this way because that 15 minutes could be just
the
Operator confirming something prior to reselecting.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Bunky" wrote in message
...
I have a mainform with two subforms, all driven by different
tables.
On
the
one subform, when the operation clicks an option (there are 17 of
them), I
have code running behind it to populate different fields one of
which
is
the
Comment Date and Time field. The problem is if the operator is
in
the
middle
of entering an option and then goes on break. When, they come
back,
the
time
is 15 minutes off the actual time the operator did the work.
Here
is
the
code.
Private Sub Frame10_Click()
Me.Splst.Value = fOSUserName()
Me.Parent!Specialist.Value = fOSUserName()
Me.Parent![Date Worked].Value = Me.DateofComment.Value
Me.OptionChosen = Me.Frame10.Value
Me.Parent!Results.Value = Me.Frame10.Value
End Sub

I thought if they just re-clicked another option and then clicked
the
first
option chosen, it would update the time but it does not. How can
I
force a
new time each time an option is clicked?

Ideas are always welcome!











 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:27 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.