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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|