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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Form Refresh



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2010, 09:10 PM posted to microsoft.public.access.forms
Bateman28
external usenet poster
 
Posts: 13
Default Form Refresh

Hi

I have a form that has VB for different fields within the main form. One of
my options is when a specific field is ticked the corresponding fields that
need to be completed have there backcolour change so the agent becomes aware
of the fields. I also have VB code set so that when specific fields are
completed the "Finish" button becomes visable to ensure all the needed data
is captured. The issue is that once the agents have completed all the
relevent information needed they are clicking the finish button and the data
is being sent to the backend of the database but the fields where the
colours changed to identify the needed criteria stay the same colour. The
second problem is the "Finish" button stays visible instead of returning to
its original state of being hiden. As you can imagine this is very annoying,
any help would be greatly appreciated

Code Example:

Private Sub chkCheckedBUG_BeforeUpdate(Cancel As Integer)

If Me!chkCheckedBUG = 0 Then
If (IsNull(Me.chkCheckedBUG.Value) Or (Me.chkCheckedWIP.Value = "")) Then
Me.cmdFinish.Visible = False
Else
Me.cmdFinish.Visible = True
End If

Me.Refresh!

End Sub

  #2  
Old May 27th, 2010, 09:11 PM posted to microsoft.public.access.forms
Daryl S[_2_]
external usenet poster
 
Posts: 881
Default Form Refresh

Bateman28 -

In the code for your Finish button, add code to clear any color formatting
on the fields. Then before you can make the Finish button invisible again,
you need to move the focus away from the Finish button. So set the focus to
another control, then set the cmdFinish.visible = False.

--
Daryl S


"Bateman28" wrote:

Hi

I have a form that has VB for different fields within the main form. One of
my options is when a specific field is ticked the corresponding fields that
need to be completed have there backcolour change so the agent becomes aware
of the fields. I also have VB code set so that when specific fields are
completed the "Finish" button becomes visable to ensure all the needed data
is captured. The issue is that once the agents have completed all the
relevent information needed they are clicking the finish button and the data
is being sent to the backend of the database but the fields where the
colours changed to identify the needed criteria stay the same colour. The
second problem is the "Finish" button stays visible instead of returning to
its original state of being hiden. As you can imagine this is very annoying,
any help would be greatly appreciated

Code Example:

Private Sub chkCheckedBUG_BeforeUpdate(Cancel As Integer)

If Me!chkCheckedBUG = 0 Then
If (IsNull(Me.chkCheckedBUG.Value) Or (Me.chkCheckedWIP.Value = "")) Then
Me.cmdFinish.Visible = False
Else
Me.cmdFinish.Visible = True
End If

Me.Refresh!

End Sub

  #3  
Old May 27th, 2010, 09:42 PM posted to microsoft.public.access.forms
Bateman28
external usenet poster
 
Posts: 13
Default Form Refresh

Thats all i was missing. I changed the focus as advised and it worked a treat

Thanks for your quick response

"Daryl S" wrote:

Bateman28 -

In the code for your Finish button, add code to clear any color formatting
on the fields. Then before you can make the Finish button invisible again,
you need to move the focus away from the Finish button. So set the focus to
another control, then set the cmdFinish.visible = False.

--
Daryl S


"Bateman28" wrote:

Hi

I have a form that has VB for different fields within the main form. One of
my options is when a specific field is ticked the corresponding fields that
need to be completed have there backcolour change so the agent becomes aware
of the fields. I also have VB code set so that when specific fields are
completed the "Finish" button becomes visable to ensure all the needed data
is captured. The issue is that once the agents have completed all the
relevent information needed they are clicking the finish button and the data
is being sent to the backend of the database but the fields where the
colours changed to identify the needed criteria stay the same colour. The
second problem is the "Finish" button stays visible instead of returning to
its original state of being hiden. As you can imagine this is very annoying,
any help would be greatly appreciated

Code Example:

Private Sub chkCheckedBUG_BeforeUpdate(Cancel As Integer)

If Me!chkCheckedBUG = 0 Then
If (IsNull(Me.chkCheckedBUG.Value) Or (Me.chkCheckedWIP.Value = "")) Then
Me.cmdFinish.Visible = False
Else
Me.cmdFinish.Visible = True
End If

Me.Refresh!

End Sub

 




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:48 PM.


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