• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 281
  • Last Modified:

How can I change control property only for current record on the endless form?

I have an endless form and want to change the active control's appearence only for the current record, not for all records. Now, if I assign a function to the event "gotfocus", and this function changes some control's properties, I see these changes in all records, not only in current one. So, how can I (if it's possible at all) limit the control's appearence change to the current record?

Thanks in advance.
0
inversojvo
Asked:
inversojvo
  • 4
  • 3
1 Solution
 
Mike EghtebasDatabase and Application DeveloperCommented:
This is how contious form behaves.  I suggest for you to describe what exactly want to accomplish for us to suggest a diiferent way of doing it.

Mike
0
 
inversojvoAuthor Commented:
I've endless form of the size, which allows to show 4 records at one screen. Each record has ca. 15 fields, able to take focus. That means, that the screen at each moment has 60 controls, able to take focus. It's a bit too many and makes it difficult to recognize the active control at first glance.

For such situations on a single form I make 2 functions, which change some visual properties of active control to make it easy to notice. One function makes a control visible different from others and I set property OnGotFocus equal to it, another reset these visual properties back when I leave the control (OnLostFocus). This small trick is taken from Access Cookbook.
For a single form it works perfectly. For the endless form it makes the control different from all others on all 4 records, and it'll obviously distract the attention of user between all 4 "differently looking" controls. It looks hmmm... not quite ugly, but enough to want not to do it this way.. So, I thought, that the way around it might exist..
0
 
pique_techCommented:
You might try conditional formatting--it will do what you're asking, even in continuous forms.

In form design view, click on the field you want to have formatted.  Then click on Format -> Conditional Formatting, then choose from the various choices you have there.  For example, if you wanted all the even numbers in the field to be red, you'd select
Condition 1:  EXPRESSION IS  and in the empty box you'd type [NameOfField} Mod 2 = 0
then select the text color icon and select red.

I think this is what you meant.  Post here if not.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
pique_techCommented:
Not that I see your additional explanation, I think this might help.  There is a choice in the Conditional Formatting wizard for Field Has Focus, which should get you very close to what you're looking for.

Try it out to see if it meets your needs.
0
 
pique_techCommented:
Obviously, my first word above should have been "NOW ..."

Fat fingers.
0
 
inversojvoAuthor Commented:
2 pique tech: it works! Can not makes absolutely the same as with a function, but anyway smth. close.
Thank you very much - the answer was quick and helpful :)
0
 
pique_techCommented:
Thanks, glad to help.

I checked and it only works for the current field; wouldn't it be nice if there were a "current record" option?  Oh well, apparently Microsoft knows what we need better than we do.   ; )
0
 
inversojvoAuthor Commented:
you can set it as a property of control, i.e. an object, available during design mode, but we don't have the object "current record" in design mode.
Of course, to mark somehow "current record" would be nice, but IMHO, it's more important to have a possibility to mark the active control. At least if to chose between these 2 functionalities. Even Microsoft can't do everything :)
Besides, namely this fact let me see a salary droping on my account each month, so I'm obviously don't mind, if MS leaves some stuff undone :=)
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now