I've got a continuous form that is a grid of statistical values.
When the user clicks on a statistic, something happens (specifically a
graph is created showing rolling one-year values for the stat in
question).
What I'd like to do is have the current cell highlighted somehow so
its clearer which statistic is "current".
MouseOver doesn't seem to be an option because the form is continuous
- i.e. all cells in the column get whatever highlighting I apply in
MousOver.
I'm thinking the Enter() event. Second-best, but better than
nothing.
But when I try something like:
-------------------------------
Sub txtWhatever_Enter()
With Me.txtWhatEver
.SelStart = 0
.SelLength = 99
End with
End Sub
-------------------------------
I can only get the highlight if I pause the code.
Sounds like I'm missing something, but what? 9 6033
Anything you do related to setting a property of a field is doomed to failure
because there is a single control object in charge of all instances of a
control on a continuous or datasheet form.
What you need to use is conditional formatting. In fact, I think something
like "Current Selection" is one of the options in the format condition
drop-down list.
On Thu, 12 May 2005 10:14:09 -0400, PeteCresswell <x@y.z.Invalid> wrote: I've got a continuous form that is a grid of statistical values.
When the user clicks on a statistic, something happens (specifically a graph is created showing rolling one-year values for the stat in question).
What I'd like to do is have the current cell highlighted somehow so its clearer which statistic is "current".
MouseOver doesn't seem to be an option because the form is continuous - i.e. all cells in the column get whatever highlighting I apply in MousOver.
I'm thinking the Enter() event. Second-best, but better than nothing.
But when I try something like:
------------------------------- Sub txtWhatever_Enter() With Me.txtWhatEver .SelStart = 0 .SelLength = 99 End with End Sub -------------------------------
I can only get the highlight if I pause the code.
Sounds like I'm missing something, but what?
On Thu, 12 May 2005 07:26:21 -0700, Steve Jorgensen
<no****@nospam.nospam> wrote: What you need to use is conditional formatting. In fact, I think something like "Current Selection" is one of the options in the format condition drop-down list.
Thanks - I'll start looking at that right now.
Also, on the ".Select", I had the wrong event. Shb Click().
Yes there is a current selection criteria in conditional formatting.
It works very well with datasheets. You have to go through and set
this for every column you want the highlighting to occur on. And even
then it only highlights the cell, not the whole row. But it is still
nice.
Per sh******@cs.fsu.edu: You have to go through and set this for every column you want the highlighting to occur on. And even then it only highlights the cell, not the whole row. But it is still nice.
Just the cell and not the row is exactly what I want.
But I haven't found anything yet. Maybe I'm looking in the wrong place.
I've been looking at .Format. Should I be looking for some kind of event?
--
PeteCresswell
(PeteCresswell) wrote: Per sh******@cs.fsu.edu:
You have to go through and set this for every column you want the highlighting to occur on. And even then it only highlights the cell, not the whole row. But it is still nice.
Just the cell and not the row is exactly what I want.
But I haven't found anything yet. Maybe I'm looking in the wrong place. I've been looking at .Format. Should I be looking for some kind of event?
Pete - the solution I've used is to write my own class to do this; perhaps that is an
option to consider. You can create some number of rows of controls on a form and hide
them. Make the appropriate number of rows and columns visible and implement your own
navigation code to fill those controls.
Define the controls WithEvents and you can do things like MouseOver or Conditional
formatting to your heart's content. Takes a bit of programming but you would have your own
custom "Continuous form" tool.
--
'---------------
'John Mishefske
'---------------
On Thu, 12 May 2005 20:44:28 -0700, "(PeteCresswell)" <x@y.z.invalid> wrote: Per sh******@cs.fsu.edu:You have to go through and set this for every column you want the highlighting to occur on. And even then it only highlights the cell, not the whole row. But it is still nice.
Just the cell and not the row is exactly what I want.
But I haven't found anything yet. Maybe I'm looking in the wrong place. I've been looking at .Format. Should I be looking for some kind of event?
You can get to it from code, but you don't need to. Just select Conditional
Formatting from the menu in form design. If you want, you can select multiple
fields first, and set them all at once, but they must have -exactly- the same
formatting for that to work (otherwise, you get a cryptic error at the end).
On Thu, 12 May 2005 20:59:49 -0700, Steve Jorgensen
<no****@nospam.nospam> wrote: You can get to it from code, but you don't need to. Just select Conditional Formatting from the menu in form design. If you want, you can select multiple fields first, and set them all at once, but they must have -exactly- the same formatting for that to work (otherwise, you get a cryptic error at the end).
Found it. But it seems value-oriented - i.e. no provision for
"Currently-Selected".
John M's approach sounds interesting - all the more so bc it would be
re-usable. Maybe I'll start pecking away at that.
On Fri, 13 May 2005 11:01:15 -0400, PeteCresswell <x@y.z.Invalid> wrote: On Thu, 12 May 2005 20:59:49 -0700, Steve Jorgensen <no****@nospam.nospam> wrote:
You can get to it from code, but you don't need to. Just select Conditional Formatting from the menu in form design. If you want, you can select multiple fields first, and set them all at once, but they must have -exactly- the same formatting for that to work (otherwise, you get a cryptic error at the end). Found it. But it seems value-oriented - i.e. no provision for "Currently-Selected".
That's what "Field Has Focus" means. Do you not see that option in the first
drop-down on the left? John M's approach sounds interesting - all the more so bc it would be re-usable. Maybe I'll start pecking away at that.
Per Steve Jorgensen: That's what "Field Has Focus" means. Do you not see that option in the first drop-down on the left?
A mild case of RCI on my part. I looked at the range-suggestive fields and
said to myself "Nope, that's not the one...." - without popping the combo box.
This lets me do exactly, *precisely* what I wanted to do.
Thanks again - and sorry for being so dense.
--
PeteCresswell This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Prakash Wadhwani |
last post by:
Is there any EASY way to highlight a full row in a continuous form so
that as i navigate up & down the table/continuous form using the arrow
keys, the entire line (all fields) get highlighted ?
...
|
by: B |
last post by:
I know there are several ways to speed up combo boxes and form
loading. Most of the solutions leave rowsource of the combo box blank
and set the rowsource to a saved query or an SQL with a where...
|
by: Damian |
last post by:
Hi.
Is there a way to programatically populate a continuous form?
I have an array of descriptions that I want to display in the
continuous form and I have a textbox on the form called...
|
by: Prakash Wadhwani |
last post by:
I'd like to highlight the Current Row in a continuous form using
Conditional Formatting VBA Code similar to as under in the CURRENT
Event of the Form:
My Field Names are as follows: Name, Age,...
|
by: Bob Alston |
last post by:
I have some dates which show in a continuous form, multiple rows at a
time. I would like to color the background yellow, or the text yellow
or some color other than black that would stand out,...
|
by: Kathy |
last post by:
What is the standard technique for handling the fields in the following
scenario on a continuous form?
Multiple Divisions. Each Division has multiple Buildings. Each Building has
a Supervisor.
...
|
by: Robert |
last post by:
Need some help to stop me going around in circles on this one....
Have a nested subform (subform2) which simulates a continuous form for the
record on the parent subform.
Subform2 has rows of...
|
by: tizmagik |
last post by:
I have a combobox on a continuous form that has a recordsource that is
set upon Form_Load event via VBA (based on initial form data and
external form data entered). For data entry purposes the...
|
by: Steve |
last post by:
I have a continuous form showing Product Code and Product Name. Product Code
is five digits and is sequential. I have a textbox in the form header. What
is the code to scroll the continuous form so...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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,...
|
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...
| |