Friends,
In my DB, I use the following code to set the Caption and ControlTipText properties on a series of command buttons. I must do this, because depending on the type of work we are doing, the captions and tips may change.
Here is the problem: Whenever I hover my mouse over these command buttons, the control tip text never pops up. I do have other commend buttons which are not updated, and their control tips pop up with no problem.
The There are no errors in the code, and when the form's command buttons have been populated, from the Immediate Window, when I query the control tip text of a command button, I get this:
produces the desired result:
I have compared the properties for both sets of buttons, and all is identical except the buttons above call a function on the OnClick event, whereas the standard buttons simply execute a standard VBA sub.
There must be something I am overlooking! Any ideas?
In my DB, I use the following code to set the Caption and ControlTipText properties on a series of command buttons. I must do this, because depending on the type of work we are doing, the captions and tips may change.
Code:
Private Sub SetLabels()
On Error GoTo EH:
Dim strSource
Dim dbLabels As Database
Dim rstLabels As Recordset
Set dbLabels = CurrentDb()
strSQL = "SELECT * FROM tblDiscrepancyTypes ORDER BY DiscKey;"
Set rstLabels = dbLabels.OpenRecordset(strSQL, dbOpenDynaset)
If Not rstLabels.EOF Then
rstLabels.MoveFirst
Do While Not rstLabels.EOF
Me("cmdDiscrepancy" & rstLabels("DiscKey")).Caption = rstLabels("DiscDesc")
Me("cmdDiscrepancy" & rstLabels("DiscKey")).ControlTipText = rstLabels("TipText")
rstLabels.MoveNext
Loop
rstLabels.Close
dbLabels.Close
End If
Exit Sub
EH:
MsgBox "Error Setting Labels. Please contact your Database Administrator.", vbOKOnly, "Error!"
Exit Sub
End Sub
The There are no errors in the code, and when the form's command buttons have been populated, from the Immediate Window, when I query the control tip text of a command button, I get this:
Code:
?Forms.frmPRFReview.cmdDiscrepancy45.ControlTipText
Code:
Click here if there are any other errors or discrepancies found on the PRF
There must be something I am overlooking! Any ideas?
Comment