On a form i have a subform "SfrmOrders". The visiblity of this subform is set to false in the properties window.
I have on my form a button "CmdSfrmOrders" with the following Click event
If CmdSfrmOrders.Caption = "Show saved orders" Then
Me!SfrmOrders.Visible = True
CmdSfrmOrders.Caption = "Hide saved orders"
CmdSfrmOrders.ForeColor = RGB(255, 0, 0)
Else
Me!SfrmOrders.Visible = False
CmdSfrmOrders.Caption = "Show saved orders"
CmdSfrmOrders.ForeColor = RGB(0, 0, 0)
End If
This works fine but with a strange behavior when the subform is made visibile for the first time. In this case i have to cick twice on the button to get the subform visibile. After that only one click suffice.
What's the reason for the need to click twice the first time ?
I have on my form a button "CmdSfrmOrders" with the following Click event
If CmdSfrmOrders.Caption = "Show saved orders" Then
Me!SfrmOrders.Visible = True
CmdSfrmOrders.Caption = "Hide saved orders"
CmdSfrmOrders.ForeColor = RGB(255, 0, 0)
Else
Me!SfrmOrders.Visible = False
CmdSfrmOrders.Caption = "Show saved orders"
CmdSfrmOrders.ForeColor = RGB(0, 0, 0)
End If
This works fine but with a strange behavior when the subform is made visibile for the first time. In this case i have to cick twice on the button to get the subform visibile. After that only one click suffice.
What's the reason for the need to click twice the first time ?