473,663 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

changing control formating if it's value changed in form

3 New Member
hi to you all
am trying make the control formatting changes when changing it's value to keep track of what controls i've changed in the form,wither it was a combobox or textbox .
i had this idea of making the control checks the value in the table's field which is bounded to,so if they are not equal,so i tried Conditional Formatting using the "not equal to" and point it to the field in the table which is the control is bounded to , didn't work,and in the expression mode typing "<>" with the same previous pointing,got the same result
any other ideas ?
thank you
Mar 15 '16 #1
3 925
NeoPa
32,568 Recognized Expert Moderator MVP
That's a good idea, but can't work as you have nothing to compare the value with. VBA gives you access to the .OldValue, but Conditional Formatting is not run in VBA.

What you may be able to get working is some code in the AfterUpdate event procedures of all controls that compare the .Value with the .OldValue and set the background colour accordingly.
Mar 16 '16 #2
ccoldfire
3 New Member
That exactly what i did,thank you
Mar 16 '16 #3
NeoPa
32,568 Recognized Expert Moderator MVP
It was a pleasure and I'm very pleased you were able to work with it.

I would recommend that each event procedure calls a (single) separate procedure that does the main work, and that this has a parameter indicating which control has been updated. Far tidier than loads of copies of the same code.
Mar 16 '16 #4

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

Similar topics

4
4103
by: mitch-co2 | last post by:
What I am trying to do is when someone clicks on the YES radio button I want the text field called MYTEXT to equal the text field named DATE. The below code works as long as I do NOT UN-COMMENT the NO radio button, once I do that it will not work. Any help would be greatly appreciated. Mitch
2
4991
by: Karl Irvin | last post by:
In continous form is there a way to tell the name of the currently highlighted control and its value?
3
2118
by: MS | last post by:
What's the best way to "store" and display a value in a text box that changes from day to day. An example of this would be where the name of the user is manually typed in after using the datbase, along with (say) the date. ATM, I have a table with (say) 4 fields. Each field is linked to a column in a combo box. The combo box is invisible on the form. The text boxes display previous data using code something like this... Private Sub...
1
6718
by: Omar Llanos | last post by:
How can I change the background color of an MDI form? I read in msdn that it takes the background of windows (and not the BackColor) but I wanted to really make sure. I know that in VC it can be done. Thanks.
6
6872
by: AMP | last post by:
Hello, I have an mdi program with a child form ("A") and another child ("B"). I want to change the text of a label on A by changing an item from a combobox on B. I can code the comboBox1_SelectedIndexChanged that is on B but I dont know how to send that info to the label on A.I cant seem to access A from B. Help Thanks Mike
3
1432
by: Netter | last post by:
I made a usercontrol (a couple of years ago). Actually it is a calculator with lots of little buttons. I have the control on a form. When I view the form in the IDE (or when running) the control is larger then when I view the control itself in its project in the IDE. Actually the control is larger and everything in it is proportionally scaled. For example, the buttons are larger. So the control looks the same but is bigger.
7
4157
by: Mahmoud Al-Qudsi | last post by:
I have a list of strings that refer to various controls on a form. They're not all the same type, they are all unique. How can I say (Control)StringList.text = "mytext" Basically, set the `text` property for the winforms control named 'StringList' to "mytext"
7
5282
by: laredotornado | last post by:
Hi, Using the onblur handler in a text field, how can I check if the value was changed from what was originally there prior to the user focussing on the text field? Thanks, - Dave
2
1372
by: flap152 | last post by:
I'm trying to build a collection of a few controls (a subset of controls from a report in Access) for later use in a foreach statement Dim ControlList1 As New Collection ' to hold controls for formating ControlList1.Add (tbRevision) ' does not work ControlList1.Add (Me.Controls("tbChecklist")) ' does not work either The collection gets the value of the default property for the control (a string), instead of the control itself.
0
1188
by: Tim F | last post by:
Hi all, I have been scratching my head over this one for a day now! I have a word 2007 document with 2 user forms, Form1 and Form2. Form2 is activated from Form1 and should let the user select a value from a listbox and have that value sent to a textbox Text1 in Form1. I am doing this as follows: in Form1 module Public Sub SetCode(ByVal Code as String) Me.Field1.Value=Code
0
8435
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8768
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8547
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
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 we have to send another system

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.