473,473 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Control Tip Text does not pop up

twinnyfo
3,653 Recognized Expert Moderator Specialist
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.

Expand|Select|Wrap|Line Numbers
  1. Private Sub SetLabels()
  2. On Error GoTo EH:
  3.     Dim strSource
  4.     Dim dbLabels As Database
  5.     Dim rstLabels As Recordset
  6.     Set dbLabels = CurrentDb()
  7.     strSQL = "SELECT * FROM tblDiscrepancyTypes ORDER BY DiscKey;"
  8.     Set rstLabels = dbLabels.OpenRecordset(strSQL, dbOpenDynaset)
  9.     If Not rstLabels.EOF Then
  10.         rstLabels.MoveFirst
  11.         Do While Not rstLabels.EOF
  12.             Me("cmdDiscrepancy" & rstLabels("DiscKey")).Caption = rstLabels("DiscDesc")
  13.             Me("cmdDiscrepancy" & rstLabels("DiscKey")).ControlTipText = rstLabels("TipText")
  14.             rstLabels.MoveNext
  15.         Loop
  16.         rstLabels.Close
  17.         dbLabels.Close
  18.     End If
  19.     Exit Sub
  20. EH:
  21.     MsgBox "Error Setting Labels.  Please contact your Database Administrator.", vbOKOnly, "Error!"
  22.     Exit Sub
  23. End Sub
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:

Expand|Select|Wrap|Line Numbers
  1. ?Forms.frmPRFReview.cmdDiscrepancy45.ControlTipText
produces the desired result:

Expand|Select|Wrap|Line Numbers
  1. Click here if there are any other errors or discrepancies found on the PRF
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?
Oct 19 '12 #1
10 5831
zmbd
5,501 Recognized Expert Moderator Expert
me.repaint
Fixed a similur issue for me in V97 and I continue to issue this anytime I change a caption or other non-textbox.
Oct 19 '12 #2
twinnyfo
3,653 Recognized Expert Moderator Specialist
Z,

Thanks, but no luck so far...... I'll have to play some more with it later....
Oct 19 '12 #3
zmbd
5,501 Recognized Expert Moderator Expert
sigh.
Usually works.
Lines 12 and 13 look strange... would you confirm that the labels are changing from line 12
Also do a debug.print _resolvedcontrolname___.controltiptext after line 13 where "_resolvedcontrolname___" is the actual name of one of the controls to make sure that the controltiptext has actually changed and is well formed. Sometimes malformed strings won't error... instead they're ignored.

I just did this in one of the test databases and without repaint the changes took and the tip would show so I suspect it has to be something with how the text is being entered into the control tip property.
Oct 19 '12 #4
zmbd
5,501 Recognized Expert Moderator Expert
Just noticed you printed in the immediate window... sorry.
I know it seems redunant; however, please do it in the runtime too... wouldn't hurt as a trouble shoot do the debug print after each command execution in the loop. I'm suspecting that you're overwriting the text at somepoint and you may not find it in the stepthru mode.
Oct 19 '12 #5
twinnyfo
3,653 Recognized Expert Moderator Specialist
Z,

I've been playing with this form for several days, and still with no success....

Re: Post #4, Lines 12 and 13 ARE executing properly. Just to make sure, I deleted all the Caption and ControlTipText entires. Even entered a space, then deleted the space for each control. The form opened fine and populated the captions for the controls with no problem.

Re: Post #4 and #5, I added a line of code to Debug.Print each Caption and ControlTipText by name, with no issues.

My ONLY thought on this might be that there is some type of issue with the data in the table from which the code retrieves the ControlTipText data. But, this would make no sense at all, since both fields are identical (except for max characters). Both fields were simply typed in.

Very mind-boggling! Any other thoughts or ideas?
Oct 24 '12 #6
zmbd
5,501 Recognized Expert Moderator Expert
For giggles:
Do the ole make a new db and import.

IF that doesn't work, then can you post the resolved strings?
Oct 24 '12 #7
twinnyfo
3,653 Recognized Expert Moderator Specialist
Z,

The resolved strings you are looking for are:

Expand|Select|Wrap|Line Numbers
  1. cmdDiscrepancy1.ControlTipText
  2. ...
  3. cmdDiscrepancy45.ControlTipText
I'll work the DB Redo, which is quite the headache because of the Custom view I must rebuilt for my nav pane (unless you know a way to import that?).....
Oct 24 '12 #8
zmbd
5,501 Recognized Expert Moderator Expert
I've tried everything I can think of to break the contoltiptext.
I've tried buffer-over-runs
I've tried special charactors
You name it.
I think we're going to have to see some of the data.
From what I've read, any typable charactor upto 255 in length can go into the property.
Oct 24 '12 #9
twinnyfo
3,653 Recognized Expert Moderator Specialist
OK, Z,

The Access Gremlins win again! Completely new DB, import all, still no worky! Old DB, Copy all old controls, Paste to new controls.... Control tips work on new controls. Delete old controls, rename new controls. All is wonderful again in Accessland...

This was not a "solution" but just simply a way to make it work.

Why, Microsoft? Why???
Oct 24 '12 #10
zmbd
5,501 Recognized Expert Moderator Expert
Agreed... Very frustrating.
Oct 24 '12 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Rob Richardson | last post by:
Greetings! I just developed a little control I've wanted for ages. It links a textbox and a label into a single control. At first, I gave it a property named LabelText and another named...
4
by: Milan | last post by:
Hi, I am having a problem with displaying a * to a required field. There seems to be a problem with this and the static value does not appear unless you submit the page. I am trying to display...
6
by: jcrouse | last post by:
I am rotating some text is some label controls. In the one place I use it it works fine. In the other place I use it I can't figure out the syntax. I don't really understand the event. Where it...
2
by: Johann Robette | last post by:
Hi, I'm trying to call the array_to_string function like this : SELECT array_to_string(array, '~^~') --> it comes directly from the doc. I get this error msg : ERROR: parser: parse error at...
2
by: Kiran | last post by:
Hello all, I am using a tree to display stuff, and it is constantly updated, but what I have noticed is in the lowest level, there is clearly noticable cutoff of the text I place there. The cutoff...
8
by: Zytan | last post by:
TextChanged is only called when the user modifes a control's text, not if the program does. How can I make it be called when the program modifies the text? Zytan
2
by: =?Utf-8?B?SlA=?= | last post by:
Hi all. I'm having a problem with a postback issue and I think it's cache related. Here's my setup: I have a web site that has a signup section. This has simple things like name, age, birth...
2
by: =?Utf-8?B?Sm9obiBXYWxrZXI=?= | last post by:
Hi, In asp.net 1.1 I use this bit of code to get the text from a textbox in a datagrid on postback: txtComments = CType(dgi.FindControl("txtComments"), System.Web.UI.WebControls.TextBox) We...
1
by: nitarag | last post by:
Is there a way to create a login user control that does it's postback using SSL so that the entered username and password are protected? I need to do this without SSL Encrypting the entire page...
1
by: mylixes | last post by:
I have a DataGridView in my application. When I logged in, the records will be displayed in the grid. It works fine. But when I logged out and logged in again, this arror appears, "No row can be...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.