473,387 Members | 1,664 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,387 software developers and data experts.

Dynamic Highlighting On Continuous Form?

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?
Nov 13 '05 #1
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?


Nov 13 '05 #2
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().

Nov 13 '05 #3
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.

Nov 13 '05 #4
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
Nov 13 '05 #5
(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
'---------------
Nov 13 '05 #6
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).
Nov 13 '05 #7
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.
Nov 13 '05 #8
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.


Nov 13 '05 #9
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
Nov 13 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
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 ? ...
3
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...
3
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...
1
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,...
4
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,...
4
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. ...
20
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...
1
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
0
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...
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
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
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...
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...

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.