Dear experts,
I have placed on my main menu form command buttons with an picture to access forms/reports.
The picture in the button is gray by default, I created the same button with a orange button and set it hidden
Underneath the command button I put a textbox with label.
The label gives the command button its name and the textbox returns a DCOUNT value when true. If value false then the textbox is not visible.
When the textbox has a true value, then the command button with the orange label becomes visible and the gray one is hidden.
I have attached a picture for visual reference.
When I open the form though there's a runtime delay on the command button of a few seconds before it shows.
Could I overcome this by replacing the picture in the command button instead? If so, how to go about?
Now I'm hidding one command button and making the other one visible...
Below the VBA code I'm using:
I have placed on my main menu form command buttons with an picture to access forms/reports.
The picture in the button is gray by default, I created the same button with a orange button and set it hidden
Underneath the command button I put a textbox with label.
The label gives the command button its name and the textbox returns a DCOUNT value when true. If value false then the textbox is not visible.
When the textbox has a true value, then the command button with the orange label becomes visible and the gray one is hidden.
I have attached a picture for visual reference.
When I open the form though there's a runtime delay on the command button of a few seconds before it shows.
Could I overcome this by replacing the picture in the command button instead? If so, how to go about?
Now I'm hidding one command button and making the other one visible...
Below the VBA code I'm using:
Code:
Private Sub Form_Current()
If Nz(Me!txtBirthday, "") = "" Then
Me!cmdBirthdayO.Visible = False
Me!cmdBirthdayG.Visible = True
Else
Me!cmdBirthdayO.Visible = True
Me!cmdBirthdayG.Visible = False
End If
End Sub
Attachments
Last edited: