473,411 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Is there a way to make a control tip show up via VBA?

Seth Schrock
2,965 Expert 2GB
I would like to be able to make a control tip show up when Me.Recordset.NoMatch is true. I have the code that does the testing already, but I haven't been able to find online how to makes it visible. This is purely an aesthetic thing so it is no big deal if it isn't possible. I've just seen it done on other programs and thought I would try to duplicate it.
Dec 14 '12 #1

✓ answered by NeoPa

This is managed by the mouse Seth. I very much doubt it could work at all if there were a way to set it explicitly via code.

17 4572
NeoPa
32,556 Expert Mod 16PB
This is managed by the mouse Seth. I very much doubt it could work at all if there were a way to set it explicitly via code.
Dec 14 '12 #2
Seth Schrock
2,965 Expert 2GB
This might be way to complex, but what about calling the MouseMove event in my code? I could change the text back and forth between "" and "Incorrect Loan Number" so that when called by the function it would read "Incorrect Loan Number" and when triggered by the mouse it would be "". I would have to have the function set it to "Incorrect Loan Number", show it, and then at the end of the code set it back to "". Is this the idea of a crazy person or is it worth a try? I haven't ever played with the MouseMove event so I'm not sure what all it does and I thought I would run it by you before I dive into it.
Dec 14 '12 #3
Seth Schrock
2,965 Expert 2GB
It just suddenly came to me. I can just put a label that has my message and make it visible or not in my If/Then statement and make it a whole bunch easier.
Dec 14 '12 #4
zmbd
5,501 Expert Mod 4TB
Seth,
Normally I use a text box as you've mentioned.... or better yet I set the focus back to the control with the invalid data and set the outline to Red from the normal color.

The tooltip text can be changed in real time by VBA and is something I have done upon occation; however, as Neopa points out, this only "pops" open during a mouse hover.

I have also used a modal popup form with a close command tripped by the timer event (and an OK button for those that read faster :) ) that warns of things. I like this in that I can set the timer to 0 which forces the user to click ok or the event will close the form in 5 or so seconds. I have done this a few different ways :).
Dec 14 '12 #5
NeoPa
32,556 Expert Mod 16PB
As I'm thoroughly inebriated ATM I will assume that Z's comment makes sense and answers your question Seth. Actually, I think I understand well enough to appreciate Z's comment actually makes sense. Otherwise, I feel safe to rely on him anyway.
Dec 15 '12 #6
Seth Schrock
2,965 Expert 2GB
I would rather stay on the small side and keep with the label/textbox and not use the popup form. In this case I like the label better because it doesn't allow the user to click in it. I know that if you set Enable = false, it keeps you from being able to click in it, but then you loose the ability to control the looks of the control. I really wish that you could. I'm not sure why the looks are locked down when Enable is set to false on textboxes.
Dec 15 '12 #7
NeoPa
32,556 Expert Mod 16PB
Seth:
I'm not sure why the looks are locked down when Enable is set to false on textboxes.
It's so that operators have visual clues that the control is disabled. If you want it to look the same but simply be locked, then set .Locked = True instead.
Dec 15 '12 #8
Seth Schrock
2,965 Expert 2GB
I could do that but that still allows you to click in it. Oh well, at least I have options.
Dec 15 '12 #9
zmbd
5,501 Expert Mod 4TB
Set the on_click event to set the focus to someother control on the form :)
Dec 15 '12 #10
NeoPa
32,556 Expert Mod 16PB
Seth:
I could do that but that still allows you to click in it.
I was responding to your specific question (hence the quote), rather than making any suggestion for current usage.

As Z says, you could force it somewhere else, but that gets messy when trying to handle it taking control from causes other than a simple click. It's very difficult (and I've tried) to leave it without being even more confusing and 'wrong' than the problem you're trying to fix.
Dec 15 '12 #11
zmbd
5,501 Expert Mod 4TB
NeoPa,
Respectfully, a single control properly formatted with a re-direct shouldn't cause too much confusion for the average user. Most will assume that the control isn't click-able.

The other option... and I know people don't like this....
Use a label control.
me.lblUserFeedBack_AccountNumber.caption = strMSG
You can set this to some generic message or set the visible property to false until needed. I actually use this control on the popup form and pass the message as an augment; however, I was trying to stay within the "normal" usage of things so I didn't suggest it at first.
Dec 15 '12 #12
NeoPa
32,556 Expert Mod 16PB
Z:
NeoPa,
Respectfully, a single control properly formatted with a re-direct shouldn't cause too much confusion for the average user. Most will assume that the control isn't click-able.
One of the most common, and useful, facilities in a form that uses keyboard control is the ability to Tab forwards and backwards through the controls. Users are unlikely to get confused by such a setup, but they are certainly going to be unimpressed if such an important feature is set aside for something relatively trivial like this.

I suspect the Label option is still the best suggestion.
Dec 15 '12 #13
TheSmileyCoder
2,322 Expert Mod 2GB
Just a quick remark: If a textbox is BOTH disabled AND locked, you can format it any way you want. If a textbox is ONLY disabled, access will force some degree of formatting upon it.
Dec 15 '12 #14
NeoPa
32,556 Expert Mod 16PB
Well I'll be! I never suspected that. It's true of course.
Dec 15 '12 #15
Seth Schrock
2,965 Expert 2GB
Just curious, is there a benefit to using a textbox in this situation compared to a label? The only property that will change is the visible property in this case.
Dec 16 '12 #16
zmbd
5,501 Expert Mod 4TB
I think it's more principle than application.
In this case, I prefer the label as it is not intended to be a user accessible control. By default the format follows the themes (in v2007/2010) or define label style, is not part of the tab order, is not naively something a user will interact with, doesn't have any overhead for events to check, and is intended to provide information to the user (although usually of a static nature).
Some purists will scream that a label is to never, ever be altered via code no mater what and that is what a textbox is supposed to be used for... now I've not always followed the lemmings. However, there may be some valid reason not use them... let's see what others have to say :)
Dec 16 '12 #17
NeoPa
32,556 Expert Mod 16PB
I'm with Z on this one. I can't imagine why even a purist would suggest that Labels shouldn't be used for such items. I'd suggest that they are more appropriate than TextBoxes as they are not there to interact with the user, but merely to pass information to them. A Label then (IMHO) is the more appropriate control of the two.
Dec 17 '12 #18

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

Similar topics

0
by: Mauricio C Vidotto | last post by:
I have an application that use MaskedTextBox Control. This control has Mask property value 9999999.99 and I would like to add numeric values with 2 decimal places. However, if I set Text property...
2
by: VB Programmer | last post by:
I created a VB.NET user control which I now want to use in my ASP.NET webform. The uc shows up fine in my toolbar, but when I click on it it goes to the bottom of the form, rather than letting me...
8
by: Andrew | last post by:
Hello, friends, We created a drop-down menu bar and a show/hide calendar web user controls mainly using javaScript and html. However, they both have the problem that they are not dispaly as...
2
by: Iwan Budihalim | last post by:
Dear All, I try to create Windows Control Library and embedded it to my web project. after successfull creating the windows control library and put the control to my web all the control show...
12
by: raghav | last post by:
Hi I am working on ASP.NET 2.0. I am developing a website using Wizard control. Based on number of steps added, next, previous, finish buttons generate automatically. After running the...
2
by: R. K. Wijayaratne | last post by:
Hi everyone, I am trying to develop a Winforms app using .NET FW 1.1 (don't want to use 2.0 for this particular project) and am trying to use the IE control. It compiles and builds without...
2
by: vishwaskothari | last post by:
how we can program the calendar control so that it shows the current system date when the form loads ????? TIA regards vishwas
2
by: piercy | last post by:
Hi, Theres a part in my program that i cant know the length of time the process will take. This is not due to me but due to the API's im having to deal with. i know the group amount (ie. 3 groups)...
2
by: \(O\)enone | last post by:
I'm trying to create a usercontrol that is transparent, both visibly and to mouse clicks. I can make the usercontrol visibly transparent by setting the SupportsTransparentBackColor style and...
3
by: Andrus | last post by:
Winforms appl creates customer edit form containing textboxes using Customer dataSource = Northwind.Customers.GetByName("Airbus"); MaskedTextBox tb = new MaskedTextBox(); Binding binding = new...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.